Skip to content

Commit 503982f

Browse files
committed
Add whatsnew entry
1 parent 05e3b24 commit 503982f

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

Doc/whatsnew/3.15.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,22 @@ math
261261
(Contributed by Bénédikt Tran in :gh:`135853`.)
262262

263263

264+
multiprocessing
265+
---------------
266+
267+
* Add the optional ``buffersize`` parameter to
268+
:meth:`multiprocessing.pool.Pool.imap` and
269+
:meth:`multiprocessing.pool.Pool.imap_unordered` to limit the number of
270+
submitted tasks whose results have not yet been yielded. If the buffer is
271+
full, iteration over the *iterables* pauses until a result is yielded from
272+
the buffer. To fully utilize pool's capacity when using this feature, set
273+
*buffersize* at least to the number of processes in pool (to consume
274+
*iterable* as you go), or even higher (to prefetch the next
275+
``N=buffersize-processes`` arguments).
276+
277+
(Contributed by Oleksandr Baltian in :gh:`136871`.)
278+
279+
264280
os.path
265281
-------
266282

0 commit comments

Comments
 (0)