(self, timeout)
| 729 | # Wait in the barrier until we are released. Raise an exception |
| 730 | # if the barrier is reset or broken. |
| 731 | def _wait(self, timeout): |
| 732 | if not self._cond.wait_for(lambda : self._state != 0, timeout): |
| 733 | #timed out. Break the barrier |
| 734 | self._break() |
| 735 | raise BrokenBarrierError |
| 736 | if self._state < 0: |
| 737 | raise BrokenBarrierError |
| 738 | assert self._state == 1 |
| 739 | |
| 740 | # If we are the last thread to exit the barrier, signal any threads |
| 741 | # waiting for the barrier to drain. |