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

Method _handle_completion

Lib/asyncio/tasks.py:602–608  ·  view source on GitHub ↗
(self, f)

Source from the content-addressed store, hash-verified

600 self._todo.clear() # Can't do todo.remove(f) in the loop.
601
602 def _handle_completion(self, f):
603 if not self._todo:
604 return # _handle_timeout() was here first.
605 self._todo.remove(f)
606 self._done.put_nowait(f)
607 if not self._todo and self._timeout_handle is not None:
608 self._timeout_handle.cancel()
609
610 async def _wait_for_one(self, resolve=False):
611 # Wait for the next future to be done and return it unless resolve is

Callers

nothing calls this directly

Calls 3

removeMethod · 0.45
put_nowaitMethod · 0.45
cancelMethod · 0.45

Tested by

no test coverage detected