MCPcopy Create free account
hub / github.com/RustPython/RustPython / _FirstCompletedWaiter

Class _FirstCompletedWaiter

Lib/concurrent/futures/_base.py:96–109  ·  view source on GitHub ↗

Used by wait(return_when=FIRST_COMPLETED).

Source from the content-addressed store, hash-verified

94 self.event.set()
95
96class _FirstCompletedWaiter(_Waiter):
97 """Used by wait(return_when=FIRST_COMPLETED)."""
98
99 def add_result(self, future):
100 super().add_result(future)
101 self.event.set()
102
103 def add_exception(self, future):
104 super().add_exception(future)
105 self.event.set()
106
107 def add_cancelled(self, future):
108 super().add_cancelled(future)
109 self.event.set()
110
111class _AllCompletedWaiter(_Waiter):
112 """Used by wait(return_when=FIRST_EXCEPTION and ALL_COMPLETED)."""

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected