◐ Shell
clean mode source ↗

GH-98023: Change default child watcher to `PidfdChildWatcher` on supported systems by kumaraditya303 · Pull Request #98024 · python/cpython

@kumaraditya303

gvanrossum

This was referenced

Oct 7, 2022

@gvanrossum

carljm added a commit to carljm/cpython that referenced this pull request

Oct 8, 2022

carljm added a commit to carljm/cpython that referenced this pull request

Oct 9, 2022

mpage pushed a commit to mpage/cpython that referenced this pull request

Oct 11, 2022

bdraco added a commit to bdraco/home-assistant that referenced this pull request

Feb 12, 2023
This is a backport from cpython 3.12

https://docs.python.org/3/library/asyncio-policy.html
> PidfdChildWatcher is a “Goldilocks” child watcher implementation. It doesn’t require signals or threads, doesn’t interfere with any processes launched outside the event loop, and scales linearly with the number of subprocesses launched by the event loop. The main disadvantage is that pidfds are specific to Linux, and only work on recent (5.3+) kernels.

python/cpython#98024
There are some additional fixes in cpython 3.12
in python/cpython#94184
when there is no event loop running in the main thread
but this is not a problem we have

balloob pushed a commit to home-assistant/core that referenced this pull request

Feb 12, 2023
This is a backport from cpython 3.12

https://docs.python.org/3/library/asyncio-policy.html
> PidfdChildWatcher is a “Goldilocks” child watcher implementation. It doesn’t require signals or threads, doesn’t interfere with any processes launched outside the event loop, and scales linearly with the number of subprocesses launched by the event loop. The main disadvantage is that pidfds are specific to Linux, and only work on recent (5.3+) kernels.

python/cpython#98024
There are some additional fixes in cpython 3.12
in python/cpython#94184
when there is no event loop running in the main thread
but this is not a problem we have

AlePerla pushed a commit to AlePerla/homeassistant_core that referenced this pull request

Feb 17, 2023
This is a backport from cpython 3.12

https://docs.python.org/3/library/asyncio-policy.html
> PidfdChildWatcher is a “Goldilocks” child watcher implementation. It doesn’t require signals or threads, doesn’t interfere with any processes launched outside the event loop, and scales linearly with the number of subprocesses launched by the event loop. The main disadvantage is that pidfds are specific to Linux, and only work on recent (5.3+) kernels.

python/cpython#98024
There are some additional fixes in cpython 3.12
in python/cpython#94184
when there is no event loop running in the main thread
but this is not a problem we have