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 vstinner
Recipients aeros, pitrou, tomMoral, vstinner
Date 2020-04-28.16:43:01
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1588092181.18.0.134049447708.issue39995@roundup.psfhosted.org>
In-reply-to
Content
Thomas Moreau: "One solution would be to use the `self._shutdown_lock` from the executor to protect the call to `close` in `terminate_broken` and the call to `self._thread_wakeup.wakeup` in `shutdown`. That way, the lock is only acquired at critical points without being used all the time. This could also be done by adding `lock=True/False` to only lock the potentially dangerous calls."

I wrote a conservative PR 19760 which always lock ProcessPoolExecutor._shutdown_lock while accessing _ThreadWakeup.

PR 19760 fix test_killed_child(): it doesn't fail anymore, even with my msg367463 patch (add sleep).
History
Date User Action Args
2020-04-28 16:43:01vstinnersetrecipients: + vstinner, pitrou, tomMoral, aeros
2020-04-28 16:43:01vstinnersetmessageid: <1588092181.18.0.134049447708.issue39995@roundup.psfhosted.org>
2020-04-28 16:43:01vstinnerlinkissue39995 messages
2020-04-28 16:43:01vstinnercreate