]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-64192: Add *buffersize* to `imap()`/`imap_unordered()` in `multiprocessing.pool...
authorOleksandr Baltian <obaltian@icloud.com>
Wed, 29 Jul 2026 13:56:07 +0000 (15:56 +0200)
committerGitHub <noreply@github.com>
Wed, 29 Jul 2026 13:56:07 +0000 (15:56 +0200)
commitae18daedc75f40fdca7921bee3ce61dd1192c475
treeadb4e56fd15e2072e02b3f13883e21d257765eca
parent9ccd5bb81edde823fb5fdbd51287f4a0ddfcd149
gh-64192: Add *buffersize* to `imap()`/`imap_unordered()` in `multiprocessing.pool` (GH-136871)

The new argument allows consuming the input iterator lazily, potentially
saving memory, and allowing long/infinite iterators.

It mirrors the *buffersize* argument to `concurrent.futures.Executor.map`
that was added in 3.14.

Co-authored-by: Oleksandr Baltian <oleksandr.baltian@maklai.com.ua>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Sasha Baltian <sasha.baltian@hyperexponential.com>
Doc/library/multiprocessing.rst
Doc/whatsnew/3.16.rst
Lib/multiprocessing/pool.py
Lib/test/_test_multiprocessing.py
Misc/NEWS.d/next/Library/2025-07-28-11-00-49.gh-issue-64192.7htLtg.rst [new file with mode: 0644]