[issue11663] concurrent.futures (or multiprocessing?) doesn't detect killed processes

STINNER Victor report at bugs.python.org
Thu Mar 24 17:33:16 CET 2011


STINNER Victor <victor.stinner at haypocalc.com> added the comment:

In the following example, the parent doesn't react when the child process is killed:
-----
from os import getpid
from time import sleep, time
from multiprocessing import Pool

def f(sec):
    print("child %s: wait %s seconds" % (getpid(), sec))
    sleep(sec)

if __name__ == '__main__':
    print("parent %s: wait child" % (getpid(),))
    pool = Pool(processes=1)
    result = pool.apply_async(f, [60])
    print(result.get(timeout=120))
    print("parent: done")
-----

----------

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


More information about the Python-bugs-list mailing list