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.
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.1.1.tar.gz
(4.9 kB
view details)
File details
Details for the file yg.lockfile-2.1.1.tar.gz
.
File metadata
- Download URL: yg.lockfile-2.1.1.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3156ee5f4fa2511a6e1d544f4dbed39961f4ac40637dc157c0549fca6942ba72 |
|
MD5 | 78040130b6764ccdd1d806d5315a383d |
|
BLAKE2b-256 | 28ae00ac89c07ace97502d530a3cf0cbeac9f171bf166e7f3043f1c932be2483 |