Message333199
> 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.
--
Stefan
...ich hab' noch einen Koffer in Berlin... |
|
Date |
User |
Action |
Args |
2019-01-08 01:54:30 | stefan | set | recipients:
+ stefan, vstinner, asvetlov, yselivanov |
2019-01-08 01:54:28 | stefan | link | issue35635 messages |
2019-01-08 01:54:28 | stefan | create | |
|