Hi,

run_in_executor() should only be used on regular blocking function,
not on asyncio asynchronous functions (coroutines, tasks, etc.)

You should call run_in_executor() inside a coroutine:

@asyncio.coroutine
def async(attr1, attr2):
   ...
   yield loop.run_in_executor(None, time.sleep, 5)
   ...
   return 1+1

Victor

Reply via email to