summaryrefslogtreecommitdiffstats
path: root/Lib/multiprocessing
diff options
context:
space:
mode:
authorRichard Oudkerk <shibturn@gmail.com>2012-06-06 16:52:18 (GMT)
committerRichard Oudkerk <shibturn@gmail.com>2012-06-06 16:52:18 (GMT)
commitd44a4a27a6968558c3a78dbf2578ac7dcbd2ee08 (patch)
tree1eb3d6182a2e7e19fcdb8dd69b09afd3f6be4000 /Lib/multiprocessing
parent0a09f3e2c32677b30414a3af93b9bc1841606326 (diff)
downloadcpython-d44a4a27a6968558c3a78dbf2578ac7dcbd2ee08.zip
cpython-d44a4a27a6968558c3a78dbf2578ac7dcbd2ee08.tar.gz
cpython-d44a4a27a6968558c3a78dbf2578ac7dcbd2ee08.tar.bz2
Issue #12157: pool.map() does not handle empty iterable correctly
Initial patch by mouad
Diffstat (limited to 'Lib/multiprocessing')
-rw-r--r--Lib/multiprocessing/pool.py1
1 files changed, 1 insertions, 0 deletions
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 @@ 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)