Hi,

I'm trying to run pulsar in multiprocessing mode (using the multiprocessing 
module to create processes rather than asyncio subprocess).
However, in python 3.6 I have a small problem.
When the new process starts, it creates the event loop and starts it but I 
get

raise RuntimeError('This event loop is already running')

The loop is not running, but the _running_loop global in the asyncio.events 
module 
has been inherited from the master process and therefore the get_event_loop 
function is somehow broken.

I resolved the issue via setting the running loop to None when the Process 
run method is called:

def run(self):
    try:
        from asyncio.events import _set_running_loop
        _set_running_loop(None)
    except ImportError:
        pass
    ...

Is that what I'm supposed to do? Or is there a better way?

Thanks!

Reply via email to