@@ -61,11 +61,18 @@ Executor Objects
6161 The returned iterator raises a :exc: `TimeoutError `
6262 if :meth: `~iterator.__next__ ` is called and the result isn't available
6363 after *timeout * seconds from the original call to :meth: `Executor.map `.
64- *timeout * can be an int or a float. If *timeout * is not specified or
64+ *timeout * can be an int or a float.
65+ It cancels all future calls of *fn * and closes the iterator.
66+ If *timeout * is not specified or
6567 ``None ``, there is no limit to the wait time.
6668
6769 If a *fn * call raises an exception, then that exception will be
6870 raised when its value is retrieved from the iterator.
71+ It does not cancel future calls of *fn *.
72+
73+ The returned iterator has method :meth: `!close ` which cancels all
74+ future calls of *fn * and discards the results of already finished calls
75+ if they are available.
6976
7077 When using :class: `ProcessPoolExecutor `, this method chops *iterables *
7178 into a number of chunks which it submits to the pool as separate
@@ -82,6 +89,10 @@ Executor Objects
8289 .. versionchanged :: 3.14
8390 Added the *buffersize * parameter.
8491
92+ .. versionchanged :: next
93+ The returned iterator is no longer automatically closed if a *fn *
94+ call raises an exception.
95+
8596 .. method :: shutdown(wait=True, *, cancel_futures=False)
8697
8798 Signal the executor that it should free any resources that it is using
0 commit comments