title: Why is the asyncio is blocking with the processPool?
body: <p>I have a following code:</p>
  
  <pre><code>import time
  import asyncio
  from concurrent.futures import ProcessPoolExecutor
  
  def blocking_func(x):
      print("In blocking waiting")
      time.sleep(x) # Pretend this is expensive calculations
      print("after blocking waiting")
      return x * 5
  
  @asyncio.coroutine
  def main():
      executor = ProcessPoolExecutor()
  
      out = yield from loop.run_in_executor(executor, blocking_func, 2)  # This does not
      print("after process pool")
      print(out)
  
  if __name__ == "__main__":
      loop = asyncio.get_event_loop()
      loop.run_until_complete(main())
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>In blocking waiting
  after blocking waiting
  after process pool
  10
  </code></pre>
  
  <p>But I was expecting the process pool will run the code in different process. So I was expecting the output to be:</p>
  
  <p>Expecting output:</p>
  
  <pre><code>In blocking waiting
  after process pool
  after blocking waiting
  10
  </code></pre>
  
  <p>I thought if we run the code on process pool it would not block the main loop.But in the output it came back to the main event loop after it is done with the blocking function.</p>
  
  <p>What is blocking the event loop? Is it the blocking_function? If it is the blocking_function what is the use of having the process pool?</p>