commit | d44a4a27a6968558c3a78dbf2578ac7dcbd2ee08 | [log] [tgz] |
---|---|---|
author | Richard Oudkerk <shibturn@gmail.com> | Wed Jun 06 17:52:18 2012 +0100 |
committer | Richard Oudkerk <shibturn@gmail.com> | Wed Jun 06 17:52:18 2012 +0100 |
tree | 1eb3d6182a2e7e19fcdb8dd69b09afd3f6be4000 | |
parent | 0a09f3e2c32677b30414a3af93b9bc1841606326 [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 99b4df4..170aa7f 100644 --- a/Lib/multiprocessing/pool.py +++ b/Lib/multiprocessing/pool.py
@@ -576,6 +576,7 @@ if chunksize <= 0: self._number_left = 0 self._ready = True + del cache[self._job] else: self._number_left = length//chunksize + bool(length % chunksize)