Message356069
> My the main question is: how to detect if the new watcher can be used or asyncio should fallback to threaded based solution?
Perhaps in the __init__ we could do something like this:
class PidfdChildWatcher(AbstractChildWatcher):
def __init__(self):
if not hasattr(os, "pidfd_open"):
raise RuntimeError("os.pidfd_open() is unavailable.")
...
Thoughts?
> My WIP progress patch is attached. It passes all asyncio tests.
I think we could also specifically look for race conditions with `./python -m test test_asyncio.test_subprocess -F -j4`, rather than relying on the tests passing with a single job. The other child watchers have been particularly infamous when it comes race conditions and resource leaks.
I'd be glad to work on testing and opening a PR to asyncio if needed (while giving Benjamin credit for the patch of course). |
|
Date |
User |
Action |
Args |
2019-11-05 22:07:22 | aeros | set | recipients:
+ aeros, vstinner, benjamin.peterson, njs, asvetlov, yselivanov, nanjekyejoannah |
2019-11-05 22:07:22 | aeros | set | messageid: <1572991642.53.0.478032431664.issue38692@roundup.psfhosted.org> |
2019-11-05 22:07:22 | aeros | link | issue38692 messages |
2019-11-05 22:07:22 | aeros | create | |
|