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

Class _WaitCancelFuture

Lib/asyncio/windows_events.py:171–192  ·  view source on GitHub ↗

Subclass of Future which represents a wait for the cancellation of a _WaitHandleFuture using an event.

Source from the content-addressed store, hash-verified

169
170
171class _WaitCancelFuture(_BaseWaitHandleFuture):
172 """Subclass of Future which represents a wait for the cancellation of a
173 _WaitHandleFuture using an event.
174 """
175
176 def __init__(self, ov, event, wait_handle, *, loop=None):
177 super().__init__(ov, event, wait_handle, loop=loop)
178
179 self._done_callback = None
180
181 def cancel(self):
182 raise RuntimeError("_WaitCancelFuture must not be cancelled")
183
184 def set_result(self, result):
185 super().set_result(result)
186 if self._done_callback is not None:
187 self._done_callback(self)
188
189 def set_exception(self, exception):
190 super().set_exception(exception)
191 if self._done_callback is not None:
192 self._done_callback(self)
193
194
195class _WaitHandleFuture(_BaseWaitHandleFuture):

Callers 1

_wait_for_handleMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…