Skip to content

Commit 2c614a8

Browse files
[3.13] Mention the "context manager" keyword in concurrent.futures documentation (GH-130976) (#137811)
Mention the "context manager" keyword in concurrent.futures documentation (GH-130976) (cherry picked from commit 095bc77) Co-authored-by: Jakub Stasiak <jakub@stasiak.at>
1 parent 929a77c commit 2c614a8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Doc/library/concurrent.futures.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,10 @@ Executor Objects
9292
executor has started running will be completed prior to this method
9393
returning. The remaining futures are cancelled.
9494

95-
You can avoid having to call this method explicitly if you use the
96-
:keyword:`with` statement, which will shutdown the :class:`Executor`
97-
(waiting as if :meth:`Executor.shutdown` were called with *wait* set to
98-
``True``)::
95+
You can avoid having to call this method explicitly if you use the executor
96+
as a :term:`context manager` via the :keyword:`with` statement, which
97+
will shutdown the :class:`Executor` (waiting as if :meth:`Executor.shutdown`
98+
were called with *wait* set to ``True``)::
9999

100100
import shutil
101101
with ThreadPoolExecutor(max_workers=4) as e:

0 commit comments

Comments
 (0)