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

Function current_task

Lib/asyncio/tasks.py:37–41  ·  view source on GitHub ↗

Return a currently executed task.

(loop=None)

Source from the content-addressed store, hash-verified

35
36
37def current_task(loop=None):
38 """Return a currently executed task."""
39 if loop is None:
40 loop = events.get_running_loop()
41 return _current_tasks.get(loop)
42
43
44def all_tasks(loop=None):

Callers 3

_waitFunction · 0.85
gatherFunction · 0.85
shieldFunction · 0.85

Calls 1

getMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…