class documentation
class _ConcurrencyPrimitive(ABC): (source)
Known subclasses: twisted.internet.defer.DeferredLock, twisted.internet.defer.DeferredSemaphore
Undocumented
| Method | __aenter__ |
We can be used as an asynchronous context manager. |
| Method | __aexit__ |
Undocumented |
| Method | __init__ |
Undocumented |
| Method | acquire |
Undocumented |
| Method | release |
Undocumented |
| Method | run |
Acquire, run, release. |
| Instance Variable | waiting |
Undocumented |
| Method | _release |
Undocumented |
def __aexit__(self, __exc_type:
type[ BaseException] | None, __exc_value: BaseException | None, __traceback: TracebackType | None) -> Deferred[ Literal[ False]]:
(source)
¶
Undocumented
Acquire, run, release.
This method takes a callable as its first argument and any number of other positional and keyword arguments. When the lock or semaphore is acquired, the callable will be invoked with those arguments.
The callable may return a Deferred; if it does, the lock or semaphore won't be released until that Deferred fires.
| Returns | |
Deferred[ | Deferred of function result. |