PyDocs

Nav

Networking and Interprocess Communication

Condition

asyncio

class (source) not WASI
  • Condition(lock=None)
Asynchronous equivalent to threading.Condition.

This class implements condition variable objects. A condition variable
allows one or more tasks to wait until they are notified by another
task.

A new Lock object is created and used as the underlying lock.
Changed in 3.10
  • 3.10: Removed the loop parameter.
Members of Condition

a

acquire
Acquire the underlying lock.

l

locked
Return True if the underlying lock is acquired.

n

notify
By default, wake up one task waiting on this condition, if any.
notify_all
Wake up all tasks waiting on this condition.

r

release
Release the underlying lock.

w

wait
Wait until notified.
wait_for
Wait until a predicate becomes true.
0 Examples
No examples for asyncio/Condition.
See Also
No see-alsos for asyncio/Condition
0 Notes
No notes for Condition