[issue12456] Hangs in concurrent.futures

Ross Lagerwall report at bugs.python.org
Fri Jul 1 07:49:09 CEST 2011


Ross Lagerwall <rosslagerwall at gmail.com> added the comment:

Further analysis seems to indicate that it is a race between the shutdown code and the processes finishing.

This code hangs:
"""
executor = concurrent.futures.ProcessPoolExecutor(2)
executor.map(is_prime, [1, 2])
executor.shutdown()
"""

while this doesn't:
"""
executor = concurrent.futures.ProcessPoolExecutor(2)
executor.map(is_prime, [1, 2])
time.sleep(1)
executor.shutdown()
"""

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12456>
_______________________________________


More information about the Python-bugs-list mailing list