bpo-39995: Fix concurrent.futures._ThreadWakeup race condition#19758
bpo-39995: Fix concurrent.futures._ThreadWakeup race condition#19758vstinner wants to merge 1 commit intopython:masterfrom vstinner:fix_futures_wakeup
Conversation
|
I'm not sure why this is co-authored by me, as I wrote exactly zero line of code here. |
|
Oops, that's Kyle Stanley's fix: https://bugs.python.org/issue39995#msg367486 it's not written by Antoine Pitrou :-) This PR is basically a duplicate of closed PR #19751. |
Fix a race condition in concurrent.futures._ThreadWakeup: it now uses an internal threading event to ensure that the pipe is not closed while sending or receiving bytes. Co-Authored-by: Kyle Stanley <aeros167@gmail.com>
It seems like @pitrou doesn't like this approach. @tomMoral suggested to use a regular lock. I concur that the event looks unusal. @tomMoral would prefer to avoid locking, so I wrote PR #19760 which is based on @tomMoral's idea. @pitrou: "I'm not sure why this is co-authored by me, as I wrote exactly zero line of code here." Sorry, I was confused between Kyle's proposal and your solution. I fixed the author. |
|
PR #19760 sounds like a better approach, I abandon this PR. |
Fix a race condition in concurrent.futures._ThreadWakeup: it now uses
an internal threading event to ensure pipe is not closed while
sending or receiving bytes.
Co-Authored-by: Kyle Stanley aeros167@gmail.com
https://bugs.python.org/issue39995