8000 GH-99388: add `loop_factory` parameter to `asyncio.run` by kumaraditya303 · Pull Request #99462 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

GH-99388: add loop_factory parameter to asyncio.run #99462

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 4 commits into from
Nov 14, 2022
Merged
Changes from 1 commit
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
Diff view
Prev Previous commit
Update Doc/library/asyncio-runner.rst
Co-authored-by: Guido van Rossum <gvanrossum@gmail.com>
  • Loading branch information
kumaraditya303 and gvanrossum authored Nov 14, 2022
commit d2f154656b5238db026c6e7a46657a0740bc2a3e
10 changes: 5 additions & 5 deletions Doc/library/asyncio-runner.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ Running an asyncio Program
debug mode explicitly. ``None`` is used to respect the global
:ref:`asyncio-debug-mode` settings.

If *loop_factory* is not ``None``, it is used to create a new event loop
otherwise :func:`asyncio.new_event_loop` is used and the loop is closed at the end.
It should be used as a main entry point for asyncio programs, and should ideally
only be called once. It is recommended to use *loop_factory* to configure the
event loop instead of policies.
If *loop_factory* is not ``None``, it is used to create a new event loop;
otherwise :func:`asyncio.new_event_loop` is used. The loop is closed at the end.
This function should be used as a main entry point for asyncio programs,
and should ideally only be called once. It is recommended to use
*loop_factory* to configure the event loop instead of policies.

The executor is given a timeout duration of 5 minutes to shutdown.
If the executor hasn't finished within that duration, a warning is
Expand Down
0