Reset the barrier to the initial state. Any tasks currently waiting will get the BrokenBarrier exception raised.
(self)
| 545 | self._cond.notify_all() |
| 546 | |
| 547 | async def reset(self): |
| 548 | """Reset the barrier to the initial state. |
| 549 | |
| 550 | Any tasks currently waiting will get the BrokenBarrier exception |
| 551 | raised. |
| 552 | """ |
| 553 | async with self._cond: |
| 554 | if self._count > 0: |
| 555 | if self._state is not _BarrierState.RESETTING: |
| 556 | #reset the barrier, waking up tasks |
| 557 | self._state = _BarrierState.RESETTING |
| 558 | else: |
| 559 | self._state = _BarrierState.FILLING |
| 560 | self._cond.notify_all() |
| 561 | |
| 562 | async def abort(self): |
| 563 | """Place the barrier into a 'broken' state. |
no test coverage detected