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

Method _enter

Lib/threading.py:742–749  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

740 # Block until the barrier is ready for us, or raise an exception
741 # if it is broken.
742 def _enter(self):
743 while self._state in (-1, 1):
744 # It is draining or resetting, wait until done
745 self._cond.wait()
746 #see if the barrier is in a broken state
747 if self._state < 0:
748 raise BrokenBarrierError
749 assert self._state == 0
750
751 # Optionally run the 'action' and release the threads waiting
752 # in the barrier.

Callers 1

waitMethod · 0.95

Calls 1

waitMethod · 0.45

Tested by

no test coverage detected