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

Function _on_completion

tools/python-3.11.9-amd64/Lib/asyncio/tasks.py:519–529  ·  view source on GitHub ↗
(f)

Source from the content-addressed store, hash-verified

517 counter = len(fs)
518
519 def _on_completion(f):
520 nonlocal counter
521 counter -= 1
522 if (counter <= 0 or
523 return_when == FIRST_COMPLETED or
524 return_when == FIRST_EXCEPTION and (not f.cancelled() and
525 f.exception() is not None)):
526 if timeout_handle is not None:
527 timeout_handle.cancel()
528 if not waiter.done():
529 waiter.set_result(None)
530
531 for f in fs:
532 f.add_done_callback(_on_completion)

Callers

nothing calls this directly

Calls 7

cancelledMethod · 0.45
exceptionMethod · 0.45
cancelMethod · 0.45
doneMethod · 0.45
set_resultMethod · 0.45
removeMethod · 0.45
put_nowaitMethod · 0.45

Tested by

no test coverage detected