10000 [3.11] Clarify asyncio.Runner docs re: loop_factory (GH-95979) by miss-islington · Pull Request #95982 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

[3.11] Clarify asyncio.Runner docs re: loop_factory (GH- 8000 95979) #95982

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 14, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
8000
Diff view
4 changes: 3 additions & 1 deletion Doc/library/asyncio-runner.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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::

Expand Down
0