(self)
| 494 | self._count = 0 # count tasks in Barrier |
| 495 | |
| 496 | def __repr__(self): |
| 497 | res = super().__repr__() |
| 498 | extra = f'{self._state.value}' |
| 499 | if not self.broken: |
| 500 | extra += f', waiters:{self.n_waiting}/{self.parties}' |
| 501 | return f'<{res[1:-1]} [{extra}]>' |
| 502 | |
| 503 | async def __aenter__(self): |
| 504 | # wait for the barrier reaches the parties number |