Skip to content

Commit 095bc77

Browse files
authored
Mention the "context manager" keyword in concurrent.futures documentation (#130976)
1 parent 8665769 commit 095bc77

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
@@ -101,10 +101,10 @@ Executor Objects
101101
executor has started running will be completed prior to this method
102102
returning. The remaining futures are cancelled.
103103

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

109109
import shutil
110110
with ThreadPoolExecutor(max_workers=4) as e:

0 commit comments

Comments
 (0)