MCPcopy
hub / github.com/tornadoweb/tornado / _garbage_collect

Method _garbage_collect

tornado/locks.py:45–50  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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
53class Condition(_TimeoutGarbageCollector):

Callers 2

on_timeoutMethod · 0.80
on_timeoutMethod · 0.80

Calls 1

doneMethod · 0.45

Tested by

no test coverage detected