Module locking
source code
File locking for the cache system, to avoid problems
when multiple processes work with the same module.
Only works on UNIX systems.
Two python libraries can be used:
flufl.lock : A nfs safe which can be downloaded from:
https://launchpad.net/flufl.lock
fcntl : A builtin Python module which only works on posix machines
and it is does unfortunately not work on nfs
|
get_lock(cache_dir,
module_name)
Get a new file lock. |
source code
|
|
|
release_lock(lock)
Release a lock currently held by Instant. |
source code
|
|
|
release_all_locks()
Release all locks currently held by Instant. |
source code
|
|
|
flufl = None
|
|
_lock_names = { }
|
|
_lock_files = { }
|
|
_lock_count = { }
|
|
__package__ = ' instant '
|