@@ -2448,7 +2448,7 @@ with the :class:`Pool` class.
24482448 Callbacks should complete immediately since otherwise the thread which
24492449 handles the results will get blocked.
24502450
2451- .. method :: imap(func, iterable[, chunksize])
2451+ .. method :: imap(func, iterable[, chunksize[, buffersize] ])
24522452
24532453 A lazier version of :meth: `.map `.
24542454
@@ -2462,6 +2462,17 @@ with the :class:`Pool` class.
24622462 ``next(timeout) `` will raise :exc: `multiprocessing.TimeoutError ` if the
24632463 result cannot be returned within *timeout * seconds.
24642464
2465+ The *iterable * is collected immediately rather than lazily, unless a
2466+ *buffersize * is specified to limit the number of submitted tasks whose
2467+ results have not yet been yielded. If the buffer is full, iteration over
2468+ the *iterables * pauses until a result is yielded from the buffer.
2469+ To fully utilize pool's capacity, set *buffersize * to the number of
2470+ processes in pool (to consume *iterable * as you go) or even higher
2471+ (to prefetch *buffersize - processes * arguments).
2472+
2473+ .. versionadded :: 3.15
2474+ Added the *buffersize * parameter.
2475+
24652476 .. method :: imap_unordered(func, iterable[, chunksize])
24662477
24672478 The same as :meth: `imap ` except that the ordering of the results from the
0 commit comments