Reset the barrier to the initial state. Any tasks currently waiting will get the BrokenBarrier exception raised.
(self)
| 575 | self._cond.notify_all() |
| 576 | |
| 577 | async def reset(self): |
| 578 | """Reset the barrier to the initial state. |
| 579 | |
| 580 | Any tasks currently waiting will get the BrokenBarrier exception |
| 581 | raised. |
| 582 | """ |
| 583 | async with self._cond: |
| 584 | if self._count > 0: |
| 585 | if self._state is not _BarrierState.RESETTING: |
| 586 | #reset the barrier, waking up tasks |
| 587 | self._state = _BarrierState.RESETTING |
| 588 | else: |
| 589 | self._state = _BarrierState.FILLING |
| 590 | self._cond.notify_all() |
| 591 | |
| 592 | async def abort(self): |
| 593 | """Place the barrier into a 'broken' state. |