ID EN
Threading

Condition

Python 3.11

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

Syntax

PYTHON
class threading.Condition(lock=None)

Examples

Example 1
PYTHON
while not predicate():
    cv.wait()

See Also

Lock RLock RLock RuntimeError notify() notify_all() RLock release()