This is specific kind of lock, that allows only one operation at the time (read or write) by any number of callers.
Project description
WHS Ltd provides collection of pure-python modules.
This is implementation of lock, that allows only one kind of operation be executed at the time (reading or writing). Any number of callers can acquire reading or writing at once, but if someone tries to acquire writing while reading is acquired, it will wait, until all readers that acquired lock release it (and vice versa).
At the moment it works only with threading, but few simple modifications will result in multiprocessing-enabled implementation.
whs.utils.rwlock is a package, but should be used as a module (all code is in __init__.py).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file whs.utils.rwlock-0.6.0.tar.gz
.
File metadata
- Download URL: whs.utils.rwlock-0.6.0.tar.gz
- Upload date:
- Size: 6.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d9a43bb20b0ce3d5aa8942109dd3b32e330e793fa4503cbad9b029727bb3d12 |
|
MD5 | 7f63671c8c5bf9619e610cc5ba9b07f4 |
|
BLAKE2b-256 | fe53df84d2e5993fd9f78f4f2ab2198684846c4d5b1c57f2014af0c629addf3b |