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

[3.11] gh-96098: Clearly link concurrent.futures from threading & multiprocessing docs (GH-96112) #96150

Merged
merged 1 commit into from
Aug 21, 2022
Merged
Show file tree
Hide file tree
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
Diff view
10 changes: 10 additions & 0 deletions Doc/library/multiprocessing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,16 @@ will print to standard output ::
[1, 4, 9]


.. seealso::

:class:`concurrent.futures.ProcessPoolExecutor` offers a higher level interface
to push tasks to a background process without blocking execution of the
calling process. Compared to using the :class:`~multiprocessing.pool.Pool`
interface directly, the :mod:`concurrent.futures` API more readily allows
the submission of work to the underlying process pool to be separated from
waiting for the results.


The :class:`Process` class
~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down
14 changes: 13 additions & 1 deletion Doc/library/threading.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,23 @@
--------------

This module constructs higher-level threading interfaces on top of the lower
level :mod:`_thread` module. See also the :mod:`queue` module.
level :mod:`_thread` module.

.. versionchanged:: 3.7
This module used to be optional, it is now always available.

.. seealso::

:class:`concurrent.futures.ThreadPoolExecutor` offers a higher level interface
to push tasks to a background thread without blocking execution of the
calling thread, while still being able to retrieve their results when needed.

:mod:`queue` provides a thread-safe interface for exchanging data between
running threads.

:mod:`asyncio` offers an alternative approach to achieving task level
concurrency without requiring the use of multiple operating system threads.

.. note::

In the Python 2.x series, this module contained ``camelCase`` names
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Improve discoverability of the higher level concurrent.futures module by
providing clearer links from the lower level threading and multiprocessing
modules.