title: Running an asynchronous function 'in the background'
body: <p>I have several asynchronous functions. If I call <code>_main()</code>, I can't use the second <code>_check()</code> function, because <code>_main()</code> runs continuously in a while loop. Can I run <code>_main()</code> 'in the background' to make the rest of the functions available?</p>
  <pre><code>import asyncio
  
  
  async def _main(self):
      while True:
          ...
          Update database
          ...
  
  
  async def _check(self):
      await self._confirm_update()
  
  
  async def process(self):
      if self.command in [&quot;main&quot;]:
          await self._main()
      elif self.command in [&quot;check&quot;]:
          await self._check()
  </code></pre>