MCPcopy Index your code
hub / github.com/python/cpython / _FirstCompletedWaiter

Class _FirstCompletedWaiter

Lib/concurrent/futures/_base.py:90–103  ·  view source on GitHub ↗

Used by wait(return_when=FIRST_COMPLETED).

Source from the content-addressed store, hash-verified

88 self.event.set()
89
90class _FirstCompletedWaiter(_Waiter):
91 """Used by wait(return_when=FIRST_COMPLETED)."""
92
93 def add_result(self, future):
94 super().add_result(future)
95 self.event.set()
96
97 def add_exception(self, future):
98 super().add_exception(future)
99 self.event.set()
100
101 def add_cancelled(self, future):
102 super().add_cancelled(future)
103 self.event.set()
104
105class _AllCompletedWaiter(_Waiter):
106 """Used by wait(return_when=FIRST_EXCEPTION and ALL_COMPLETED)."""

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…