File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -189,10 +189,15 @@ An event loop policy must implement the following interface:
189189
190190
191191The default policy defines context as the current thread, and manages an event
192- loop per thread that interacts with :mod: `asyncio `. If the current thread
193- doesn't already have an event loop associated with it, the default policy's
194- :meth: `~AbstractEventLoopPolicy.get_event_loop ` method creates one when
195- called from the main thread, but raises :exc: `RuntimeError ` otherwise.
192+ loop per thread that interacts with :mod: `asyncio `. An exception to this rule
193+ happens when :meth: `~AbstractEventLoopPolicy.get_event_loop ` is called from a
194+ running future/coroutine, in which case it will return the current loop
195+ running that future/coroutine.
196+
197+ If the current thread doesn't already have an event loop associated with it,
198+ the default policy's :meth: `~AbstractEventLoopPolicy.get_event_loop ` method
199+ creates one when called from the main thread, but raises :exc: `RuntimeError `
200+ otherwise.
196201
197202
198203Access to the global loop policy
You can’t perform that action at this time.
0 commit comments