t.i.d.DeferredFilesystemLock(lockfile.FilesystemLock) : class documentation

Part of twisted.internet.defer View Source View In Hierarchy

A FilesystemLock that allows for a deferred to be fired when the lock is acquired.
Instance Variables_schedulerThe object in charge of scheduling retries. In this implementation this is parameterized for testing.
_intervalThe retry interval for an IReactorTime based scheduler.
_tryLockCallA DelayedCall based on _interval that will managex the next retry for aquiring the lock.
_timeoutCallA DelayedCall based on deferUntilLocked's timeout argument. This is in charge of timing out our attempt to acquire the lock.
Method __init__
Method deferUntilLocked Wait until we acquire this lock. This method is not safe for concurrent use.

Inherited from FilesystemLock:

Method lock Acquire this lock.
Method unlock Release this lock.
def __init__(self, name, scheduler=None): (source)
ParametersnameThe name of the lock to acquire
schedulerAn object which provides IReactorTime
def deferUntilLocked(self, timeout=None): (source)
Wait until we acquire this lock. This method is not safe for concurrent use.
Parameterstimeoutthe number of seconds after which to time out if the lock has not been acquired. (type: float or int )
Returnsa deferred which will callback when the lock is acquired, or errback with a TimeoutError after timing out or an AlreadyTryingToLockError if the deferUntilLocked has already been called and not successfully locked the file.
API Documentation for Twisted, generated by pydoctor at 2011-10-27 16:07:41.