Issue #12157: pool.map() does not handle empty iterable correctly

Initial patch by mouad
This commit is contained in:
Richard Oudkerk 2012-06-06 19:04:57 +01:00
parent a3a164a03c
commit e41682b994
3 changed files with 19 additions and 3 deletions

View file

@ -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)