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

Function run_once

Lib/test/test_asyncio/utils.py:109–117  ·  view source on GitHub ↗

Legacy API to run once through the event loop. This is the recommended pattern for test code. It will poll the selector once and run all callbacks scheduled in response to I/O events.

(loop)

Source from the content-addressed store, hash-verified

107
108
109def run_once(loop):
110 """Legacy API to run once through the event loop.
111
112 This is the recommended pattern for test code. It will poll the
113 selector once and run all callbacks scheduled in response to I/O
114 events.
115 """
116 loop.call_soon(loop.stop)
117 loop.run_forever()
118
119
120class SilentWSGIRequestHandler(WSGIRequestHandler):

Callers

nothing calls this directly

Calls 2

call_soonMethod · 0.45
run_foreverMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…