title: how to run async function in Threadpoolexecutor in python
body: <p>I have an async <em>get_forecastweather</em> function which gives me JSON weather data, I understand that we can't execute the async function inside sync, but how do i do it inside a separate thread, need help, thanks in advance</p>
  <pre><code>def weather_detail(request):
      if request.method == 'GET':
          city_name = 'my_city'
          key = 'mykey'
          result = None
          with concurrent.futures.ThreadPoolExecutor(max_workers=3) as executor:
              response = executor.submit(get_forecastweather,city_name,key)
              result = response.result()
          print('Result from thread ',result)
          return render(request,'weather/weather_detail.html')
  </code></pre>
  <p><strong>the error I am getting is</strong></p>
  <pre><code> RuntimeWarning: coroutine 'get_forecastweather' was never awaited
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  RuntimeWarning: Enable tracemalloc to get the object allocation traceback
  </code></pre>