Event and loop related classes and functions


Bases: asyncio.unix_events._UnixDefaultEventLoopPolicy

Custom event policy that always returns the same event loop that is made reentrant by nest_asyncio.

_loop: Optional[] = None
get_event_loop() →[source]

Return the patched event loop.

Return an asyncio event loop.

When called from a coroutine or a callback (e.g. scheduled with call_soon or similar API), this function will always return the running event loop.

If there is no running event loop set, the function will return the result of get_event_loop_policy().get_event_loop() call.*args: Any, **kwargs: Any) →[source][source]

Reset the event loop policy to the default. _asyncio.Future, loop: Optional[] = None) → Any[source]*args: Any, **kwargs: Any)None[source][source]

Enable plumpy’s event loop policy that will make event loop’s reentrant.