Alon Diamant added the comment:

The patches I attached do 2 things:

1. A deadlock is prevented, wherein the main thread waits forever for the Pool 
thread/s to finish their execution, while they wait for instructions to 
terminate from the _task_handler thread which has died. Instead, the exception 
are caught and handled and termination of the pool execution is performed.
2. The exception that was raised is caught and passed to the main thread, and 
is re-thrown in the context of the main thread - hence the user catch it and 
handle it, or - at the very least - be aware of the issue.

I tested the patch to the best of my abilities, and am almost certain nothing 
was changed performance wise nor anything broken. 

Further eyes would, of course, only help for confirming this.


Python tracker <>
Python-bugs-list mailing list

Reply via email to