miniproto.event_loop.run
miniproto.event_loop.run
Section titled “miniproto.event_loop.run”run(main: Coroutine[Any, Any, T], *, debug: bool | None = None) -> TRun one coroutine with an optimized asyncio.Runner when possible.
Parameters:
- main (
Coroutine[Any, Any, run[T]]) – The coroutine to execute until it returns or raises. - debug (
bool | None) – Passed toasyncio.Runner.Nonepreserves asyncio’s default; known backend/debug incompatibilities use the stdlib loop.
Returns:
run[T]– The coroutine’s result.
Raises:
BaseException– Any exception raised bymainor backend setup.
Notes
The runner creates, closes, and clears its loop. It must not be called while another event loop is running in this thread.