[issue12897] Support for iterators in multiprocessing map
Richard Oudkerk
report at bugs.python.org
Fri Jun 8 13:59:11 CEST 2012
Richard Oudkerk <shibturn at gmail.com> added the comment:
If you want lazy operation then you should use imap(f, it[, chunksize]) rather than using map_async(f, it).
This will return an iterator rather than a list. Also, the iterator's next() method has a timeout argument. (chunksize is the number of items which get sent to a worker in each batch, with 1 being the default.)
----------
nosy: +sbt
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12897>
_______________________________________
More information about the Python-bugs-list
mailing list