title: Send asyncio tasks to loop running in other thread
body: <p>How can I asynchronously insert tasks to run in an <code>asyncio</code> event loop running in another thread?</p>
  
  <p>My motivation is to support interactive asynchronous workloads in the interpreter.  I can't block the main REPL thread.</p>
  
  <h2>Example</h2>
  
  <p>My current flawed understanding says that the following should work.  Why doesn't it?  What is a better way to accomplish goal above?</p>
  
  <pre><code>import asyncio
  from threading import Thread
  
  loop = asyncio.new_event_loop()
  
  def f(loop):
      asyncio.set_event_loop(loop)
      loop.run_forever()
  
  t = Thread(target=f, args=(loop,))
  t.start()    
  
  @asyncio.coroutine
  def g():
      yield from asyncio.sleep(1)
      print('Hello, world!')
  
  asyncio.async(g(), loop=loop)
  </code></pre>