This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author athompson6735
Recipients athompson6735, davin, docs@python, nemeskeyd, pitrou, terry.reedy
Date 2021-08-23.18:43:56
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1629744237.35.0.728387677801.issue43306@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2021-08-23 18:43:57athompson6735setrecipients: + athompson6735, terry.reedy, pitrou, docs@python, nemeskeyd, davin
2021-08-23 18:43:57athompson6735setmessageid: <1629744237.35.0.728387677801.issue43306@roundup.psfhosted.org>
2021-08-23 18:43:57athompson6735linkissue43306 messages
2021-08-23 18:43:57athompson6735create