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

Function run_until_complete

Lib/test/test_asyncgen.py:28–41  ·  view source on GitHub ↗
(coro)

Source from the content-addressed store, hash-verified

26
27
28def run_until_complete(coro):
29 exc = False
30 while True:
31 try:
32 if exc:
33 exc = False
34 fut = coro.throw(AwaitException)
35 else:
36 fut = coro.send(None)
37 except StopIteration as ex:
38 return ex.args[0]
39
40 if fut == ('throw',):
41 exc = True
42
43
44def to_list(gen):

Callers 1

to_listFunction · 0.85

Calls 2

throwMethod · 0.45
sendMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…