MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / __wakeup

Method __wakeup

tools/python-3.11.9-amd64/Lib/asyncio/tasks.py:347–361  ·  view source on GitHub ↗
(self, future)

Source from the content-addressed store, hash-verified

345 self = None # Needed to break cycles when an exception occurs.
346
347 def __wakeup(self, future):
348 try:
349 future.result()
350 except BaseException as exc:
351 # This may also be a cancellation.
352 self.__step(exc)
353 else:
354 # Don't pass the value of `future.result()` explicitly,
355 # as `Future.__iter__` and `Future.__await__` don't need it.
356 # If we call `_step(value, None)` instead of `_step()`,
357 # Python eval loop would use `.send(value)` method call,
358 # instead of `__next__()`, which is slower for futures
359 # that return non-generator iterators from their `__iter__`.
360 self.__step()
361 self = None # Needed to break cycles when an exception occurs.
362
363
364_PyTask = Task

Callers

nothing calls this directly

Calls 2

__stepMethod · 0.95
resultMethod · 0.45

Tested by

no test coverage detected