title: Asyncio event loop per python process (aioprocessing, multiple event loops)
body: <p>I have two processes; a main process and a subprocess. The main process is running an <code>asyncio</code> event loop, and starts the subprocess. I want to start another asyncio event loop in the subprocess. I'm using the  <code>aioprocessing</code> module to launch the subprocess.</p>
  
  <p>The subprocess function is:</p>
  
  <pre><code>def subprocess_code():
       loop = asyncio.get_event_loop()
       @asyncio.coroutine
       def f():
          for i in range(10):
              print(i)
              yield from asyncio.sleep(1)
       loop.run_until_complete(f())
  </code></pre>
  
  <p>But I get an error:</p>
  
  
  
  <pre><code>    loop.run_until_complete(f())
    File "/usr/lib/python3.4/asyncio/base_events.py", line 271, in run_until_complete
      self.run_forever()
    File "/usr/lib/python3.4/asyncio/base_events.py", line 239, in run_forever
      raise RuntimeError('Event loop is running.')
  RuntimeError: Event loop is running.
  </code></pre>
  
  <p>Is it possible to start a new, or restart the existing, <code>asyncio</code> event loop in the subprocess? If so, how?</p>