title: asyncio create_task to run forever
body: <p>I have the following code</p>
  
  <pre><code>import asyncio
  
  loop = asyncio.get_event_loop()
  
  async def while_loop():
      n = 0
      while True:
          print(f"{n}")
          await asyncio.sleep(2)
          n = n+1
  
  async def some_func():
      await asyncio.sleep(5)
      print("Some Func")
  
  future = loop.create_task(while_loop())
  loop.run_until_complete(some_func())
  </code></pre>
  
  <p>I expected the <code>while_loop</code> function to run forever but it seems to only executes as a result of calling <code>run_until_complete</code> and it stops printing the while loop once <code>some_func</code> is finished executing. The output I see is:</p>
  
  <pre><code>0
  1
  2
  Some Func
  </code></pre>
  
  <p>I expected the numbers to keep printing even after <code>some_func</code> is completed.</p>
  
  <pre><code>0
  1
  2
  Some Func
  3
  4
  5
  6
  .
  .
  .
  </code></pre>
  
  <p>The only way to get more numbers printed is to call <code>some_func</code> again.</p>