title: Using asyncio for Non-async Functions in Python?
body: <p>Suppose there is a library that makes various database queries:</p>
  
  <pre><code>import time
  
  def queryFoo():
      time.sleep(4)
      return "foo"
  
  def queryBar():
      time.sleep(4)
      return "bar"
  </code></pre>
  
  <p>I want to execute those 2 queries concurrently without having to add <code>async</code> to the method signature or adding a decorator.  These functions should not depend on asyncio at all.</p>
  
  <p><strong>What is the best way to utilize those non-async functions within <code>asyncio</code>?</strong></p>
  
  <p>I am looking for something of the form:</p>
  
  <pre><code>#I need an 'asyncWrapper'
  
  results = asyncio.gather(asyncWrapper(queryFoo()), asyncWrapper(queryBar()))
  </code></pre>
  
  <p>Thank you in advance for your consideration and response.</p>