lockfile 0.8
Platform-independent file locking module
The lockfile module exports a FileLock class which provides a simple API for locking files. Unlike the Windows msvcrt.locking function, the Unix fcntl.flock, fcntl.lockf and the deprecated posixfile module, the API is identical across both Unix (including Linux and Mac) and Windows platforms. The lock mechanism relies on the atomic nature of the link (on Unix) and mkdir (on Windows) system calls.
Version 0.8 works around a bug in the threading module.
- Author: Skip Montanaro <skip at pobox com>
- Home Page: http://smontanaro.dyndns.org/python/
- Download URL: http://smontanaro.dyndns.org/python/lockfile-0.8.tar.gz
- License: MIT License
-
Categories
- Development Status :: 4 - Beta
- Intended Audience :: Developers
- License :: OSI Approved :: MIT License
- Operating System :: MacOS
- Operating System :: Microsoft :: Windows :: Windows NT/2000
- Operating System :: POSIX
- Programming Language :: Python
- Programming Language :: Python :: 2.4
- Programming Language :: Python :: 2.5
- Programming Language :: Python :: 2.6
- Programming Language :: Python :: 2.7
- Programming Language :: Python :: 3.0
- Topic :: Software Development :: Libraries :: Python Modules
- Package Index Owner: skip
- DOAP record: lockfile-0.8.xml
Log in to rate this package.
Package rating (2 votes):
4.5
- 4 points: 1 vote
- 5 points: 1 vote
Ratings range from 0 to 5 (best).
Package Comments:
- Divius (2009-10-18, 5 points):
It's cool but LinkFileLock doesn't clean unique_name on break_lock().
Add the following lines to LinkFileLock.break_lock:
if os.path.exists(self.unique_name):
os.unlink(self.unique_name) - bialix (2009-12-28, 4 points):
Your library missed the feature to "break" the lock if the process which created the lock was killed and did not removed the lock.
