Part of bzrlib
Note: This method of locking is generally deprecated in favour of LockDir, but is used to lock local WorkingTrees, and by some old formats. It's accessed through Transport.lock_read(), etc.
This module causes two methods, lock() and unlock() to be defined in any way that works on the current platform.
It is not specified whether these locks are reentrant (i.e. can be taken repeatedly by a single process) or whether they exclude different threads in a single process. That reentrancy is provided by LockableFiles.
This defines two classes: ReadLock and WriteLock, which can be implemented in different ways on different platforms. Both have an unlock() method.
Class | LockHooks | Undocumented |
Class | Lock | Base class for locks. |
Class | LockResult | Result of an operation on a lock; passed to a hook |
Class | LogicalLockResult | The result of a lock_read/lock_write/lock_tree_write call on lockables. |
Function | cant_unlock_not_held | An attempt to unlock failed because the object was not locked. |
Class | LPTSTR | Undocumented |
Class | _OSLock | No class docstring; 1/4 methods documented |
Class | _fcntl_FileLock | Undocumented |
Class | _fcntl_WriteLock | Undocumented |
Class | _fcntl_ReadLock | No class docstring; 1/3 methods documented |
Class | _fcntl_TemporaryWriteLock | A token used when grabbing a temporary_write_lock. |
Class | _w32c_FileLock | Undocumented |
Class | _w32c_ReadLock | No class docstring; 1/2 methods documented |
Class | _w32c_WriteLock | No class docstring; 1/2 methods documented |
Class | _ctypes_FileLock | Undocumented |
Class | _ctypes_ReadLock | No class docstring; 1/2 methods documented |
Class | _ctypes_WriteLock | No class docstring; 1/2 methods documented |
Class | _RelockDebugMixin | Mixin support for -Drelock flag. |