Content-Length: 246982 | pFad | https://github.com/python/cpython/issues/96098

81 Promote concurrent.futures in threading and multiprocessing docs · Issue #96098 · python/cpython · GitHub
Skip to content
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

Promote concurrent.futures in threading and multiprocessing docs #96098

Closed
ncoghlan opened this issue Aug 19, 2022 · 0 comments
Closed

Promote concurrent.futures in threading and multiprocessing docs #96098

ncoghlan opened this issue Aug 19, 2022 · 0 comments
Assignees
Labels
docs Documentation in the Doc dir

Comments

@ncoghlan
Copy link
Contributor

Documentation

Attending a tutorial on distributed computation at KiwiPyCon, it struck me that the concurrent.futures module wasn't even mentioned, even though it is a better option than using the threading or multiprocessing modules directly for local IO bound or CPU bound operations (see https://peps.python.org/pep-3148/ for background).

Reviewing the docs, one notable omission is that neither of the lower level modules provides an explicit pointer to the higher level interface. The only cross-references are:

  • the threading docs recommend ProcessPoolExecutor as a way to work around the CPython GIL (they don't reference ThreadPoolExecutor)
  • the multiprocessing docs recommend ThreadPoolExecutor over multiprocessing.dummy.Pool (they don't reference ProcessPoolExecutor)

It would make sense to provide pointers early in the low level docs for cases where the high level API is more appropriate

@ncoghlan ncoghlan added the docs Documentation in the Doc dir label Aug 19, 2022
@ncoghlan ncoghlan self-assigned this Aug 19, 2022
ncoghlan added a commit to ncoghlan/cpython that referenced this issue Aug 19, 2022
…iprocessing docs

Also link directly to asyncio from the beginning of the threading docs.
ncoghlan added a commit that referenced this issue Aug 21, 2022
…ssing docs (GH-96112)

Clearly link concurrent.futures from threading & multiprocessing docs

Also link directly to asyncio from the beginning of the threading docs.
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Aug 21, 2022
…iprocessing docs (pythonGH-96112)

Clearly link concurrent.futures from threading & multiprocessing docs

Also link directly to asyncio from the beginning of the threading docs.
(cherry picked from commit bcc4cb0)

Co-authored-by: Nick Coghlan <ncoghlan@gmail.com>
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Aug 21, 2022
…iprocessing docs (pythonGH-96112)

Clearly link concurrent.futures from threading & multiprocessing docs

Also link directly to asyncio from the beginning of the threading docs.
(cherry picked from commit bcc4cb0)

Co-authored-by: Nick Coghlan <ncoghlan@gmail.com>
miss-islington added a commit that referenced this issue Aug 21, 2022
…ssing docs (GH-96112)

Clearly link concurrent.futures from threading & multiprocessing docs

Also link directly to asyncio from the beginning of the threading docs.
(cherry picked from commit bcc4cb0)

Co-authored-by: Nick Coghlan <ncoghlan@gmail.com>
miss-islington added a commit that referenced this issue Aug 21, 2022
…ssing docs (GH-96112)

Clearly link concurrent.futures from threading & multiprocessing docs

Also link directly to asyncio from the beginning of the threading docs.
(cherry picked from commit bcc4cb0)

Co-authored-by: Nick Coghlan <ncoghlan@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir
Projects
None yet
Development

No branches or pull requests

1 participant








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/python/cpython/issues/96098

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy