(self)
| 715 | # Optionally run the 'action' and release the threads waiting |
| 716 | # in the barrier. |
| 717 | def _release(self): |
| 718 | try: |
| 719 | if self._action: |
| 720 | self._action() |
| 721 | # enter draining state |
| 722 | self._state = 1 |
| 723 | self._cond.notify_all() |
| 724 | except: |
| 725 | #an exception during the _action handler. Break and reraise |
| 726 | self._break() |
| 727 | raise |
| 728 | |
| 729 | # Wait in the barrier until we are released. Raise an exception |
| 730 | # if the barrier is reset or broken. |
no test coverage detected