(self, n: int)
| 291 | self._notify(n) |
| 292 | |
| 293 | def _notify(self, n: int) -> None: |
| 294 | idx = 0 |
| 295 | for fut in self._waiters: |
| 296 | if idx >= n: |
| 297 | break |
| 298 | |
| 299 | if not fut.done(): |
| 300 | idx += 1 |
| 301 | fut.set_result(False) |
| 302 | |
| 303 | def notify_all(self) -> None: |
| 304 | """Wake up all tasks waiting on this condition. This method acts |