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

Function run_briefly

Lib/test/test_asyncio/utils.py:84–95  ·  view source on GitHub ↗
(loop)

Source from the content-addressed store, hash-verified

82
83
84def run_briefly(loop):
85 async def once():
86 pass
87 gen = once()
88 t = loop.create_task(gen)
89 # Don't log a warning if the task is not done after run_until_complete().
90 # It occurs if the loop is stopped or if a task raises a BaseException.
91 t._log_destroy_pending = False
92 try:
93 loop.run_until_complete(t)
94 finally:
95 gen.close()
96
97
98def run_until(loop, pred, timeout=support.SHORT_TIMEOUT):

Callers

nothing calls this directly

Calls 4

onceFunction · 0.85
create_taskMethod · 0.45
run_until_completeMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected