PyDocs

Nav

Concurrent Execution

Barrier

threading

class (source) not WASI
  • Barrier(parties, action=None, timeout=None)
Implements a Barrier.

Useful for synchronizing a fixed number of threads at known synchronization
points.  Threads block on 'wait()' and are simultaneously awoken once they
have all made that call.
Members of Barrier

a

abort
Place the barrier into a 'broken' state.

b

broken
Return True if the barrier is in a broken state.

n

n_waiting
Return the number of threads currently waiting at the barrier.

p

parties
Return the number of threads required to trip the barrier.

r

reset
Reset the barrier to the initial state.

w

wait
Wait for the barrier.
0 Examples
No examples for threading/Barrier.
See Also
No see-alsos for threading/Barrier
0 Notes
No notes for Barrier