[3.6] bpo-30038: fix race condition in signal delivery + wakeup fd (#1082) by vstinner · Pull Request #2075 · python/cpython (original) (raw)

vstinner

Before, it was possible to get the following sequence of
events (especially on Windows, where the C-level signal handler for
SIGINT is run in a separate thread):

This has been causing repeated failures in the Trio test suite:
python-trio/trio#119
(cherry picked from commit 4ae0149)

@njsmith @vstinner

Before, it was possible to get the following sequence of events (especially on Windows, where the C-level signal handler for SIGINT is run in a separate thread):

This has been causing repeated failures in the Trio test suite: python-trio/trio#119 (cherry picked from commit 4ae0149)