MCPcopy Index your code
hub / github.com/python/cpython / _wait

Method _wait

Lib/threading.py:767–774  ·  view source on GitHub ↗
(self, timeout)

Source from the content-addressed store, hash-verified

765 # Wait in the barrier until we are released. Raise an exception
766 # if the barrier is reset or broken.
767 def _wait(self, timeout):
768 if not self._cond.wait_for(lambda : self._state != 0, timeout):
769 #timed out. Break the barrier
770 self._break()
771 raise BrokenBarrierError
772 if self._state < 0:
773 raise BrokenBarrierError
774 assert self._state == 1
775
776 # If we are the last thread to exit the barrier, signal any threads
777 # waiting for the barrier to drain.

Callers 1

waitMethod · 0.95

Calls 2

_breakMethod · 0.95
wait_forMethod · 0.45

Tested by

no test coverage detected