diff options
author | Nikita Sobolev <mail@sobolevn.me> | 2024-01-24 13:30:50 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-24 13:30:50 (GMT) |
commit | 8744ecf5896ccf57875574a9aed46369b8d48dc1 (patch) | |
tree | 1f382f27f0e377bc6caa158cab4bd377f0299f49 /Doc | |
parent | 384429d1c0cf011dcf88d4043e0328de8b063c24 (diff) | |
download | cpython-8744ecf5896ccf57875574a9aed46369b8d48dc1.zip cpython-8744ecf5896ccf57875574a9aed46369b8d48dc1.tar.gz cpython-8744ecf5896ccf57875574a9aed46369b8d48dc1.tar.bz2 |
gh-101100: Fix sphinx warnings in `concurrent.futures.rst` (#114521)
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/concurrent.futures.rst | 42 | ||||
-rw-r--r-- | Doc/tools/.nitignore | 1 |
2 files changed, 22 insertions, 21 deletions
diff --git a/Doc/library/concurrent.futures.rst b/Doc/library/concurrent.futures.rst index 800c7f6..d3c7a40 100644 --- a/Doc/library/concurrent.futures.rst +++ b/Doc/library/concurrent.futures.rst @@ -275,7 +275,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. @@ -493,23 +494,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) @@ -570,7 +570,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 @@ -581,7 +582,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 diff --git a/Doc/tools/.nitignore b/Doc/tools/.nitignore index 2114ec6..6778e57 100644 --- a/Doc/tools/.nitignore +++ b/Doc/tools/.nitignore @@ -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/csv.rst Doc/library/datetime.rst Doc/library/dbm.rst |