diff options
author | Richard Oudkerk <shibturn@gmail.com> | 2012-06-06 18:04:57 (GMT) |
---|---|---|
committer | Richard Oudkerk <shibturn@gmail.com> | 2012-06-06 18:04:57 (GMT) |
commit | e41682b9945091c2e4b95a3f6a4582944fd7598e (patch) | |
tree | 00cc5480b7e07b0677ae22141f99be675945aaaa /Lib/multiprocessing/pool.py | |
parent | a3a164a03c78d66539f4fe9abf8d1dd5c08babaa (diff) | |
download | cpython-e41682b9945091c2e4b95a3f6a4582944fd7598e.zip cpython-e41682b9945091c2e4b95a3f6a4582944fd7598e.tar.gz cpython-e41682b9945091c2e4b95a3f6a4582944fd7598e.tar.bz2 |
Issue #12157: pool.map() does not handle empty iterable correctly
Initial patch by mouad
Diffstat (limited to 'Lib/multiprocessing/pool.py')
-rw-r--r-- | Lib/multiprocessing/pool.py | 1 |
1 files changed, 1 insertions, 0 deletions
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 @@ class MapResult(ApplyResult): if chunksize <= 0: self._number_left = 0 self._ready = True + del cache[self._job] else: self._number_left = length//chunksize + bool(length % chunksize) |