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

Function display_awaited_by_tasks_tree

Lib/asyncio/tools.py:265–276  ·  view source on GitHub ↗

Build and print a tree of all pending tasks under `pid`.

(pid: int)

Source from the content-addressed store, hash-verified

263
264
265def display_awaited_by_tasks_tree(pid: int) -> None:
266 """Build and print a tree of all pending tasks under `pid`."""
267
268 tasks = _get_awaited_by_tasks(pid)
269 try:
270 result = build_async_tree(tasks)
271 except CycleFoundException as e:
272 _print_cycle_exception(e)
273 sys.exit(1)
274
275 for tree in result:
276 print("\n".join(tree))

Callers

nothing calls this directly

Calls 5

_get_awaited_by_tasksFunction · 0.85
build_async_treeFunction · 0.85
_print_cycle_exceptionFunction · 0.85
exitMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…