commit | e41682b9945091c2e4b95a3f6a4582944fd7598e | [log] [tgz] |
---|---|---|
author | Richard Oudkerk <shibturn@gmail.com> | Wed Jun 06 19:04:57 2012 +0100 |
committer | Richard Oudkerk <shibturn@gmail.com> | Wed Jun 06 19:04:57 2012 +0100 |
tree | 00cc5480b7e07b0677ae22141f99be675945aaaa | |
parent | a3a164a03c78d66539f4fe9abf8d1dd5c08babaa [diff] [blame] |
Issue #12157: pool.map() does not handle empty iterable correctly Initial patch by mouad
diff --git a/Lib/multiprocessing/pool.py b/Lib/multiprocessing/pool.py index 0c29e64..ccee961 100644 --- a/Lib/multiprocessing/pool.py +++ b/Lib/multiprocessing/pool.py
@@ -584,6 +584,7 @@ if chunksize <= 0: self._number_left = 0 self._ready = True + del cache[self._job] else: self._number_left = length//chunksize + bool(length % chunksize)