[issue30976] multiprocessing.Process.is_alive can show True for dead processes

2017-07-20 Thread Mick Phillips
Mick Phillips added the comment: Yep - apologies, my mistake. -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <http://bugs.python.or

[issue30976] multiprocessing.Process.is_alive can show True for dead processes

2017-07-20 Thread Mick Phillips
New submission from Mick Phillips: multiprocessing.Process.is_alive() returns True for processes that have been killed. See attached for example. Workaround: also test against psutils.pid_exists. -- components: Windows files: alive.py messages: 298724 nosy: davin, mickp, paul.moore

[issue30975] Multiprocessing: Event.set() blocks indefinitely if a process waiting on it has died.

2017-07-20 Thread Mick Phillips
Mick Phillips added the comment: Thanks for confirming. If anyone finds this and is looking for a workaround, here's what I'm using: while not event.is_set() try: time.sleep(timeout) except (KeyboardInterrupt, IOError):

[issue30975] Multiprocessing: Event.set() blocks indefinitely if a process waiting on it has died.

2017-07-20 Thread Mick Phillips
New submission from Mick Phillips: If a process was waiting on an Event but dies for some reason, nothing else can set the Event. I think the Event._cond lock can not be acquired. See attached for a demonstration. I see the same behaviour in Python 2.7.5 and Python 3.5.2. Is this expected