mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
Issue #12157: pool.map() does not handle empty iterable correctly
Initial patch by mouad
This commit is contained in:
parent
a3a164a03c
commit
e41682b994
3 changed files with 19 additions and 3 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue