> > Is that what I'm supposed to do? Or is there a better way?
> 
> A better was is to never fork or spawn multiprocessing.Process from a running 
> coroutine.
> 
> right, so if the forking is not in a coroutine it may work?!?!

It should, because the running loop is set only when the loop is running :)

>  
>   Ideally, you want to stop the loop, spawn a process, resume the loop.
> 
> that does not sound what I should be doing, but I'll test it

I find forking from within a coroutine or a callback function to be quite 
dangerous. It’s usually better to pre-fork or to use the approach I describe 
above (with any kind of asynchronous IO framework, not just asyncio).

Yury

Reply via email to