Module b.lock

Part of bzrlib

Locking using OS file locks or file existence.

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.

Line # Kind Name Docs
48 Class LockHooks Undocumented
62 Class Lock Base class for locks.
71 Class LockResult Result of an operation on a lock; passed to a hook
416 Class OVERLAPPED Undocumented
106 Class _OSLock No class docstring; 1/5 methods documented
154 Class _fcntl_FileLock Undocumented
161 Class _fcntl_WriteLock Undocumented
195 Class _fcntl_ReadLock No class docstring; 1/3 methods documented
243 Class _fcntl_TemporaryWriteLock A token used when grabbing a temporary_write_lock.
307 Class _w32c_FileLock Undocumented
336 Class _w32c_ReadLock No class docstring; 1/2 methods documented
361 Class _w32c_WriteLock No class docstring; 1/2 methods documented
406 Class _inner_struct Undocumented
411 Class _inner_union Undocumented
423 Class _ctypes_FileLock Undocumented
461 Class _ctypes_ReadLock No class docstring; 1/2 methods documented
485 Class _ctypes_WriteLock No class docstring; 1/2 methods documented
API Documentation for BzrLib, generated by pydoctor at 2008-12-03 00:00:12.