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

Function run_async

Lib/test/test_coroutines.py:42–53  ·  view source on GitHub ↗
(coro)

Source from the content-addressed store, hash-verified

40
41
42def run_async(coro):
43 assert coro.__class__ in {types.GeneratorType, types.CoroutineType}
44
45 buffer = []
46 result = None
47 while True:
48 try:
49 buffer.append(coro.send(None))
50 except StopIteration as ex:
51 result = ex.args[0] if ex.args else None
52 break
53 return buffer, result
54
55
56def run_async__await__(coro):

Callers 15

test_send_withMethod · 0.85
test_func_1Method · 0.85
test_func_2Method · 0.85
test_func_8Method · 0.85
test_await_1Method · 0.85
test_await_2Method · 0.85
test_await_3Method · 0.85
test_await_4Method · 0.85
test_await_5Method · 0.85
test_await_6Method · 0.85
test_await_7Method · 0.85
test_await_8Method · 0.85

Calls 2

appendMethod · 0.45
sendMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…