Lockfile object with timeouts and context manager
Project description
yg.lockfile
A LockFile class that implements a context manager with timeouts on top of zc.lockfile, an excellent, cross-platorm implementation of file locking.
Usage
Example usage:
import yg.lockfile try: with yg.lockfile.LockFile('/tmp/lockfile', timeout=900): protected_operation() except yg.lockfile.LockFileTimeout: handle_unable_to_lock()
2.0
Dropped support for Python 2.6.
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.0.zip
(7.7 kB
view details)
File details
Details for the file yg.lockfile-2.0.zip
.
File metadata
- Download URL: yg.lockfile-2.0.zip
- Upload date:
- Size: 7.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 755d8b9d882f6ef809de99a8e288aaf192b225cf521c74681d3b29269f4d19ef |
|
MD5 | 4272e54c2c2e36cd1a43cffbdb6a3992 |
|
BLAKE2b-256 | 2dd76c4e92be9e55f6802e8ab65cb5866df752ac7c33fd223b1d7c2a253b9543 |