]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Clarify asyncio.Runner docs re: loop_factory (#95979)
authorKumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
Sun, 14 Aug 2022 15:53:34 +0000 (21:23 +0530)
committerGitHub <noreply@github.com>
Sun, 14 Aug 2022 15:53:34 +0000 (08:53 -0700)
Doc/library/asyncio-runner.rst

index d0df1db892f9ec7101b4d1fd7350bd5171cf1803..4abe7b6e087a609f3c5994d694d3731872c0f18c 100644 (file)
@@ -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::