Skip to content

Commit

Permalink
[3.11] gh-101100: Fix sphinx warnings in concurrent.futures.rst (GH…
Browse files Browse the repository at this point in the history
…-114521) (#114526)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
  • Loading branch information
hugovk and sobolevn authored Jan 24, 2024
1 parent 208db89 commit aa17d91
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 21 deletions.
42 changes: 22 additions & 20 deletions Doc/library/concurrent.futures.rst
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,8 @@ to a :class:`ProcessPoolExecutor` will result in deadlock.

.. versionchanged:: 3.3
When one of the worker processes terminates abruptly, a
:exc:`BrokenProcessPool` error is now raised. Previously, behaviour
:exc:`~concurrent.futures.process.BrokenProcessPool` error is now raised.
Previously, behaviour
was undefined but operations on the executor or its futures would often
freeze or deadlock.

Expand Down Expand Up @@ -469,23 +470,22 @@ Module Functions
*return_when* indicates when this function should return. It must be one of
the following constants:

.. tabularcolumns:: |l|L|

+-----------------------------+----------------------------------------+
| Constant | Description |
+=============================+========================================+
| :const:`FIRST_COMPLETED` | The function will return when any |
| | future finishes or is cancelled. |
+-----------------------------+----------------------------------------+
| :const:`FIRST_EXCEPTION` | The function will return when any |
| | future finishes by raising an |
| | exception. If no future raises an |
| | exception then it is equivalent to |
| | :const:`ALL_COMPLETED`. |
+-----------------------------+----------------------------------------+
| :const:`ALL_COMPLETED` | The function will return when all |
| | futures finish or are cancelled. |
+-----------------------------+----------------------------------------+
.. list-table::
:header-rows: 1

* - Constant
- Description

* - .. data:: FIRST_COMPLETED
- The function will return when any future finishes or is cancelled.

* - .. data:: FIRST_EXCEPTION
- The function will return when any future finishes by raising an
exception. If no future raises an exception
then it is equivalent to :const:`ALL_COMPLETED`.

* - .. data:: ALL_COMPLETED
- The function will return when all futures finish or are cancelled.

.. function:: as_completed(fs, timeout=None)

Expand Down Expand Up @@ -546,7 +546,8 @@ Exception classes
.. exception:: BrokenThreadPool

Derived from :exc:`~concurrent.futures.BrokenExecutor`, this exception
class is raised when one of the workers of a :class:`ThreadPoolExecutor`
class is raised when one of the workers
of a :class:`~concurrent.futures.ThreadPoolExecutor`
has failed initializing.

.. versionadded:: 3.7
Expand All @@ -557,7 +558,8 @@ Exception classes

Derived from :exc:`~concurrent.futures.BrokenExecutor` (formerly
:exc:`RuntimeError`), this exception class is raised when one of the
workers of a :class:`ProcessPoolExecutor` has terminated in a non-clean
workers of a :class:`~concurrent.futures.ProcessPoolExecutor`
has terminated in a non-clean
fashion (for example, if it was killed from the outside).

.. versionadded:: 3.3
1 change: 0 additions & 1 deletion Doc/tools/.nitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ Doc/library/asyncio-policy.rst
Doc/library/asyncio-subprocess.rst
Doc/library/bdb.rst
Doc/library/collections.rst
Doc/library/concurrent.futures.rst
Doc/library/copy.rst
Doc/library/csv.rst
Doc/library/ctypes.rst
Expand Down

0 comments on commit aa17d91

Please sign in to comment.