GH-98023: Change default child watcher to PidfdChildWatcher
on supported systems by kumaraditya303 · Pull Request #98024 · python/cpython (original) (raw)
This LGTM, but...
I reviewed the child watcher architecture with @1st1 and we want to first do a refactoring on PidfdChildWatcher. Basically the current PidfdChildWatcher attaches itself to the event loop in the main thread, and if it is called from a loop in another thread it won't work. ThreadedChildWatcher doesn't have this problem.
HOWEVER, Yury has a simple refactoring of PidfdChildWatcher in mind that will solve this problem! It will make attach_loop() a no-op, and is_active() will always be True -- just as it is for the ThreadedChildWatcher.
So once Yury's change is merged, this can be merged. (We don't quite have a PR but there will be one soon, I promise.)