[issue22393] multiprocessing.Pool shouldn't hang forever if a worker process dies unexpectedly

Francis Bolduc report at bugs.python.org
Thu Jun 1 16:53:39 EDT 2017


Francis Bolduc added the comment:

This problem also happens simply by calling sys.exit from one of the child processes.

The following script exhibits the problem:

import multiprocessing
import sys
def test(value):
    if value:
        sys.exit(123)
if __name__ == '__main__':
    pool = multiprocessing.Pool(4)
    cases = [0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0]
    pool.map(test, cases)

----------
nosy: +Francis Bolduc

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


More information about the Python-bugs-list mailing list