Commit 77106b2c authored by Pablo Galindo's avatar Pablo Galindo Committed by Yury Selivanov

bpo-32114: Updated the documentation for get_event_loop to reflect the policy change (#4510)

parent f658641a
...@@ -189,10 +189,15 @@ An event loop policy must implement the following interface: ...@@ -189,10 +189,15 @@ An event loop policy must implement the following interface:
The default policy defines context as the current thread, and manages an event The default policy defines context as the current thread, and manages an event
loop per thread that interacts with :mod:`asyncio`. If the current thread loop per thread that interacts with :mod:`asyncio`. An exception to this rule
doesn't already have an event loop associated with it, the default policy's happens when :meth:`~AbstractEventLoopPolicy.get_event_loop` is called from a
:meth:`~AbstractEventLoopPolicy.get_event_loop` method creates one when running future/coroutine, in which case it will return the current loop
called from the main thread, but raises :exc:`RuntimeError` otherwise. running that future/coroutine.
If the current thread doesn't already have an event loop associated with it,
the default policy's :meth:`~AbstractEventLoopPolicy.get_event_loop` method
creates one when called from the main thread, but raises :exc:`RuntimeError`
otherwise.
Access to the global loop policy Access to the global loop policy
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment