Aaron <athompson6...@gmail.com> added the comment:

What should the behavior be if an exception is raised in a pool worker during 
bootstrapping / initialization function execution? I think an exception should 
be raised in the process owning the Pool, and in the fix I'm tinkering around 
with I just raise a RuntimeError currently. I can see an argument also for 
raising different exceptions (or having different behavior) for bootstrapping 
error vs init function, but implementation is more complicated. My current 
implementation simply creates a lock in _repopulate_pool_static, acquires it, 
and waits for the worker function to release it. By polling every 100ms I also 
detect if the process exited before releasing the lock in which case I raise a 
Runtime error. I just started testing this implementation, but I'll provide it 
for anyone else who wants to test / comment.

----------
Added file: https://bugs.python.org/file50230/pool.py

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

Reply via email to