nova/vendor/lockfile
2010-05-27 23:05:26 -07:00
..
doc initial commit 2010-05-27 23:05:26 -07:00
lockfile initial commit 2010-05-27 23:05:26 -07:00
test initial commit 2010-05-27 23:05:26 -07:00
2.4.diff initial commit 2010-05-27 23:05:26 -07:00
ACKS initial commit 2010-05-27 23:05:26 -07:00
LICENSE initial commit 2010-05-27 23:05:26 -07:00
MANIFEST initial commit 2010-05-27 23:05:26 -07:00
PKG-INFO initial commit 2010-05-27 23:05:26 -07:00
README initial commit 2010-05-27 23:05:26 -07:00
RELEASE-NOTES initial commit 2010-05-27 23:05:26 -07:00
setup.py initial commit 2010-05-27 23:05:26 -07:00

The lockfile package exports a LockFile class which provides a simple API for
locking files.  Unlike the Windows msvcrt.locking function, the fcntl.lockf
and flock functions, 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.  An implementation based on SQLite is also
provided, more as a demonstration of the possibilities it provides than as
production-quality code.

Note: In version 0.9 the API changed in two significant ways:

 * It changed from a module defining several classes to a package containing
   several modules, each defining a single class.

 * Where classes had been named SomethingFileLock before the last two words
   have been reversed, so that class is now SomethingLockFile.

The previous module-level definitions of LinkFileLock, MkdirFileLock and
SQLiteFileLock will be retained until the 1.0 release.

To install:

    python setup.py install