Jonas Obrist added the comment:

So the reason this is happening is very simple:

When using Pool.apply, the task (function) is sent to the task queue, which is 
consumed by the worker. At this point the task is "in progress". However, the 
worker dies without being able to finish the task or in any other way tell the 
Pool that it can't finish the task. The actual process is then ended by the 
Pool but the task is still in limbo, so any attempt at getting a result will 
hang forever.

I'm not sure there's a straight forward way to solve this (the ways I can think 
of from the top of my head involve adding quite a bit of overhead to the Pool 
so it keeps track of which process/worker is handling which task at a given 
time, so if it exits prematurely this task can be finished), but at the very 
least this case should be documented I think.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue24927>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to