(self)
| 43 | self._timeouts = 0 |
| 44 | |
| 45 | def _garbage_collect(self) -> None: |
| 46 | # Occasionally clear timed-out waiters. |
| 47 | self._timeouts += 1 |
| 48 | if self._timeouts > 100: |
| 49 | self._timeouts = 0 |
| 50 | self._waiters = collections.deque(w for w in self._waiters if not w.done()) |
| 51 | |
| 52 | |
| 53 | class Condition(_TimeoutGarbageCollector): |
no test coverage detected