title: run async while loop independently
body: <p>Is it possible to run an async while loop independently of another one? </p>
  
  <p>Instead of the actual code I isolated the issue I am having in the following example code</p>
  
  <pre><code>import asyncio, time
  
  class Time:
      def __init__(self):
          self.start_time = 0
  
      async def dates(self):
          while True:
              t = time.time()
              if self.start_time == 0:
                  self.start_time = t
              yield t
              await asyncio.sleep(1)
  
      async def printer(self):
          while True:
  
              print('looping') # always called
  
              await asyncio.sleep(self.interval)
  
      async def init(self):
          async for i in self.dates():
              if i == self.start_time: 
                  self.interval = 3 
                  await self.printer()
              print(i) # Never Called
  
  loop = asyncio.get_event_loop()
  t = Time()
  loop.run_until_complete(t.init())
  </code></pre>
  
  <p>Is there a way to have the print function run independently so <code>print(i)</code> gets called each time?</p>
  
  <p>What it should do is <code>print(i)</code> each second and every 3 seconds call <code>self.printer(i)</code></p>
  
  <p>Essentially self.printer is a separate task that does not need to be called very often, only every <code>x</code> seconds(in this case 3). </p>
  
  <p>In JavaScript the solution is to do something like so
  <code>setInterval(printer, 3000);</code></p>
  
  <p>EDIT: Ideally self.printer would also be able to be canceled / stopped if a condition or stopping function is called</p>