bpo-38323, asyncio: Fix MultiLoopChildWatcher race condition by vstinner · Pull Request #26536 · python/cpython
-
-
Notifications
You must be signed in to change notification settings - Fork 34.7k
Conversation
Fix a race condition in asyncio MultiLoopChildWatcher: call the loop add_signal_handler() rather than calling directly signal.signal(), so signal.set_wakeup_fd() is used to wake up the event loop when the SIGCHLD signal is received. Previously, the event loop could block forever if the signal was received while the loop was idle. The signal was only proceed when another event woke up the event loop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters