summaryrefslogtreecommitdiffstats
path: root/Doc/library/asyncio-runner.rst
diff options
context:
space:
mode:
authorKumar Aditya <59607654+kumaraditya303@users.noreply.github.com>2022-08-14 15:53:34 (GMT)
committerGitHub <noreply@github.com>2022-08-14 15:53:34 (GMT)
commite8259e047c42976427b08f100b9d8ba52db7ee69 (patch)
treebee2f9e8c73059ffc323299620b7fde78e8d4a43 /Doc/library/asyncio-runner.rst
parentf2afdf33523162d5911de3263b4a9785d7c49a20 (diff)
downloadcpython-e8259e047c42976427b08f100b9d8ba52db7ee69.zip
cpython-e8259e047c42976427b08f100b9d8ba52db7ee69.tar.gz
cpython-e8259e047c42976427b08f100b9d8ba52db7ee69.tar.bz2
Clarify asyncio.Runner docs re: loop_factory (#95979)
Diffstat (limited to 'Doc/library/asyncio-runner.rst')
-rw-r--r--Doc/library/asyncio-runner.rst4
1 files changed, 3 insertions, 1 deletions
diff --git a/Doc/library/asyncio-runner.rst b/Doc/library/asyncio-runner.rst
index d0df1db..4abe7b6 100644
--- a/Doc/library/asyncio-runner.rst
+++ b/Doc/library/asyncio-runner.rst
@@ -75,7 +75,9 @@ Runner context manager
:ref:`asyncio-debug-mode` settings.
*loop_factory* could be used for overriding the loop creation.
- :func:`asyncio.new_event_loop` is used if ``None``.
+ It is the responsibility of the *loop_factory* to set the created loop as the
+ current one. By default :func:`asyncio.new_event_loop` is used and set as
+ current event loop with :func:`asyncio.set_event_loop` if *loop_factory* is ``None``.
Basically, :func:`asyncio.run()` example can be rewritten with the runner usage::