asyncio.Lock.release()

release() Release a lock. When the lock is locked, reset it to unlocked, and return. If any other coroutines are blocked waiting for the lock to become unlocked, allow exactly one of them to proceed. When invoked on an unlocked lock, a RuntimeError is raised. There is no return value.

asyncio.Lock.acquire()

coroutine acquire() Acquire a lock. This method blocks until the lock is unlocked, then sets it to locked and returns True. This method is a coroutine.

asyncio.Lock

class asyncio.Lock(*, loop=None) Primitive lock objects. A primitive lock is a synchronization primitive that is not owned by a particular coroutine when locked. A primitive lock is in one of two states, ‘locked’ or ‘unlocked’. It is created in the unlocked state. It has two basic methods, acquire() and release(). When the state is unlocked, acquire() changes the state to locked and returns immediately. When the state is locked, acquire() blocks until a call to release() in another coroutine

asyncio.LifoQueue

class asyncio.LifoQueue A subclass of Queue that retrieves most recently added entries first.

asyncio.iscoroutine()

asyncio.iscoroutine(obj) Return True if obj is a coroutine object, which may be based on a generator or an async def coroutine.

asyncio.IncompleteReadError.expected

expected Total number of expected bytes (int).

asyncio.InvalidStateError

exception asyncio.InvalidStateError The operation is not allowed in this state.

asyncio.IncompleteReadError.partial

partial Read bytes string before the end of stream was reached (bytes).

asyncio.iscoroutinefunction()

asyncio.iscoroutinefunction(func) Return True if func is determined to be a coroutine function, which may be a decorated generator function or an async def function.

asyncio.Handle.cancel()

cancel() Cancel the call. If the callback is already canceled or executed, this method has no effect.