mirror of
https://github.com/python/cpython.git
synced 2025-08-03 08:34:29 +00:00
Fix asyncio.get_event_loop() documentation (GH-18051)
Mention that the function implicitly creates new event loop only if called from the main thread.
This commit is contained in:
parent
1e420f849d
commit
2c49becc69
2 changed files with 6 additions and 2 deletions
|
@ -38,8 +38,10 @@ an event loop:
|
|||
|
||||
.. function:: get_event_loop()
|
||||
|
||||
Get the current event loop. If there is no current event loop set
|
||||
in the current OS thread and :func:`set_event_loop` has not yet
|
||||
Get the current event loop.
|
||||
|
||||
If there is no current event loop set in the current OS thread,
|
||||
the OS thread is main, and :func:`set_event_loop` has not yet
|
||||
been called, asyncio will create a new event loop and set it as the
|
||||
current one.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue