-
-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
Inconsistent documentation about calling subprocess inside async function in a child thread #108224
Labels
3.11
only security fixes
3.12
bugs and security fixes
3.13
bugs and security fixes
docs
Documentation in the Doc dir
topic-asyncio
Comments
AA-Turner
added
topic-asyncio
3.11
only security fixes
3.12
bugs and security fixes
3.13
bugs and security fixes
labels
Aug 21, 2023
Looks like the line in asyncio-dev.rst is just wrong. It should only require running in the main thread for handling signals. Feel free to submit a doc PR. |
gvanrossum
pushed a commit
that referenced
this issue
Aug 21, 2023
(Spawning subprocesses does not require the event loop to run in the main thread -- only signal handling does.)
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Aug 21, 2023
(Spawning subprocesses does not require the event loop to run in the main thread -- only signal handling does.) (cherry picked from commit 1cc391d) Co-authored-by: temach <tematibr@gmail.com>
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Aug 21, 2023
(Spawning subprocesses does not require the event loop to run in the main thread -- only signal handling does.) (cherry picked from commit 1cc391d) Co-authored-by: temach <tematibr@gmail.com>
gvanrossum
pushed a commit
that referenced
this issue
Aug 21, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
3.11
only security fixes
3.12
bugs and security fixes
3.13
bugs and security fixes
docs
Documentation in the Doc dir
topic-asyncio
Documentation
This page states: https://docs.python.org/3/library/asyncio-dev.html#concurrency-and-multithreading
For me this means that if I want to use subprocess call my async function must be triggered by loop on the main thread. In other words async functions can not call subprocess when running in child thread.
However this page states: https://docs.python.org/3/library/asyncio-subprocess.html#subprocess-and-threads
To me this means that I can spawn a child thread, call async function inside it, and that async function is free to call subprocess without problems.
Linked PRs
The text was updated successfully, but these errors were encountered: