Message400161
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. |
|
Date |
User |
Action |
Args |
2021-08-23 18:43:57 | athompson6735 | set | recipients:
+ athompson6735, terry.reedy, pitrou, docs@python, nemeskeyd, davin |
2021-08-23 18:43:57 | athompson6735 | set | messageid: <1629744237.35.0.728387677801.issue43306@roundup.psfhosted.org> |
2021-08-23 18:43:57 | athompson6735 | link | issue43306 messages |
2021-08-23 18:43:57 | athompson6735 | create | |
|