title: Async for loop on AsyncGenerator
body: <p>Having an asynchronous generator I would expect to be able to iterate through it asynchronously. However, I am missing something or messing something up or both as I end up with a regular synchronous for loop in the end:</p>
  
  <pre><code>import asyncio
  
  
  async def time_consuming(t):
      print(f"Going to sleep for {t} seconds")
      await asyncio.sleep(t)
      print(f"Slept {t} seconds")
      return t
  
  
  async def generator():
      for i in range(4, 0, -1):
          yield await time_consuming(i)
  
  
  async def consumer():
      async for t in generator():
          print(f"Doing something with {t}")
  
  
  if __name__ == '__main__':
      loop = asyncio.new_event_loop()
      loop.run_until_complete(consumer())
      loop.close()
  </code></pre>
  
  <p>This will take about 12 seconds to run and return this:</p>
  
  <pre><code>Going to sleep for 4 seconds
  Slept 4 seconds
  Doing something with 4
  Going to sleep for 3 seconds
  Slept 3 seconds
  Doing something with 3
  Going to sleep for 2 seconds
  Slept 2 seconds
  Doing something with 2
  Going to sleep for 1 seconds
  Slept 1 seconds
  Doing something with 1
  </code></pre>
  
  <p>Though I expected it to take about 4 seconds to run and return something like this:</p>
  
  <pre><code>Going to sleep for 4 seconds
  Going to sleep for 3 seconds
  Going to sleep for 2 seconds
  Going to sleep for 1 seconds
  Slept 4 seconds
  Doing something with 4
  Slept 3 seconds
  Doing something with 3
  Slept 2 seconds
  Doing something with 2
  Slept 1 seconds
  Doing something with 1
  </code></pre>