Skip to content

Commit 3ce1d00

Browse files
Clarify asyncio.Runner docs re: loop_factory (GH-95979)
(cherry picked from commit e8259e0) Co-authored-by: Kumar Aditya <[email protected]>
1 parent 38882d9 commit 3ce1d00

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Doc/library/asyncio-runner.rst

+3-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,9 @@ Runner context manager
7575
:ref:`asyncio-debug-mode` settings.
7676

7777
*loop_factory* could be used for overriding the loop creation.
78-
:func:`asyncio.new_event_loop` is used if ``None``.
78+
It is the responsibility of the *loop_factory* to set the created loop as the
79+
current one. By default :func:`asyncio.new_event_loop` is used and set as
80+
current event loop with :func:`asyncio.set_event_loop` if *loop_factory* is ``None``.
7981

8082
Basically, :func:`asyncio.run()` example can be rewritten with the runner usage::
8183

0 commit comments

Comments
 (0)