Author stefan
Recipients asvetlov, stefan, vstinner, yselivanov
Date 2019-01-08.01:54:28
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
In-reply-to <>
> The limitation is a consequence of how Linux works.
> Unix has no cross-platform API for non-blocking waiting for child process finish except handling SIGCHILD signal.

Why does the `wait()` have to be non-blocking ? We can call it once in 
response to the reception of a `SIGCHILD`, where we know the call 
wouldn't block. Then we can pass the `pid` to whatever event loop 
created the subprocess to do the cleanup there...

> On the other hand signal handlers in Python should work in the main thread.

That's fine.

> Your trick with a loop creation in the main thread and actual running in another thread can work, but asyncio doesn't guarantee it.
> The behavior can be broken in next releases, sorry.

Yeah, I observed some strange issues that looked like they could be 
fixed by someone intimately familiar with `asyncio`. But given the 
documented limitation, it seemed wise not to descend into that rabbit 
hole, and so I (at least temporarily) abandoned the entire approach.



       ...ich hab' noch einen Koffer in Berlin...
Date User Action Args
2019-01-08 01:54:30stefansetrecipients: + stefan, vstinner, asvetlov, yselivanov
2019-01-08 01:54:28stefanlinkissue35635 messages
2019-01-08 01:54:28stefancreate