(self)
| 758 | # Optionally run the 'action' and release the threads waiting |
| 759 | # in the barrier. |
| 760 | def _release(self): |
| 761 | try: |
| 762 | if self._action: |
| 763 | self._action() |
| 764 | # enter draining state |
| 765 | self._state = 1 |
| 766 | self._cond.notify_all() |
| 767 | except: |
| 768 | #an exception during the _action handler. Break and reraise |
| 769 | self._break() |
| 770 | raise |
| 771 | |
| 772 | # Wait in the barrier until we are released. Raise an exception |
| 773 | # if the barrier is reset or broken. |
no test coverage detected