Class t.i.d.DeferredSemaphore(_ConcurrencyPrimitive):

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

A semaphore for event driven systems.

API stability: Unstable
Method __init__ Undocumented
Method acquire Attempt to acquire the token.
Method release Release the token.

Inherited from _ConcurrencyPrimitive:

Method _releaseAndReturn Undocumented
Method run Acquire, run, release.
def __init__(self, tokens): (source)
Undocumented
def acquire(self): (source)
Attempt to acquire the token.
Returnsa Deferred which fires on token acquisition.
def release(self): (source)

Release the token.

Should be called by whoever did the acquire() when the shared resource is free.
API Documentation for twisted, generated by pydoctor.