MCPcopy Index your code
hub / github.com/RustPython/RustPython / task_done

Function task_done

Lib/asyncio/staggered.py:76–92  ·  view source on GitHub ↗
(task)

Source from the content-addressed store, hash-verified

74 on_completed_fut = None
75
76 def task_done(task):
77 running_tasks.discard(task)
78 futures.future_discard_from_awaited_by(task, parent_task)
79 if (
80 on_completed_fut is not None
81 and not on_completed_fut.done()
82 and not running_tasks
83 ):
84 on_completed_fut.set_result(None)
85
86 if task.cancelled():
87 return
88
89 exc = task.exception()
90 if exc is None:
91 return
92 unhandled_exceptions.append(exc)
93
94 async def run_one_coro(ok_to_start, previous_failed) -> None:
95 # in eager tasks this waits for the calling task to append this task

Callers

nothing calls this directly

Calls 6

discardMethod · 0.45
doneMethod · 0.45
set_resultMethod · 0.45
cancelledMethod · 0.45
exceptionMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected