Lockfile object with timeouts and context manager
Project description
A FileLock class that implements a context manager with timeouts on top of zc.lockfile, an excellent, cross-platorm implementation of file locking.
License
License is indicated in the project metadata (typically one or more of the Trove classifiers). For more details, see this explanation.
Usage
Example usage:
import yg.lockfile try: with yg.lockfile.FileLock('/tmp/lockfile', timeout=900): protected_operation() except yg.lockfile.FileLockTimeout: handle_unable_to_lock()
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
yg.lockfile-2.2.2.tar.gz
(6.6 kB
view hashes)
Built Distribution
Close
Hashes for yg.lockfile-2.2.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 470646bba7d0a27f8c63726ce0236dacf78b5dab49b6b1c36b96110968235b95 |
|
MD5 | 826d6f9cf46f9740d153c6fa4f56114f |
|
BLAKE2b-256 | 4ff4147a7b281816c4023485c1d712edd4afb42cc845b530ef7edf4939d6215d |