skip to navigation
skip to content

yg.lockfile 2.3

Lockfile object with timeouts and context manager

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()
 
File Type Py Version Uploaded on Size
yg.lockfile-2.3-py2.py3-none-any.whl (md5) Python Wheel py2.py3 2017-08-14 6KB
yg.lockfile-2.3.tar.gz (md5) Source 2017-08-14 6KB