bpo-39995: Fix concurrent.futures._ThreadWakeup race condition by vstinner · Pull Request #19758 · python/cpython

@vstinner @aeros

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>