(self, timeout)
| 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. |