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