You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Asyncio contains the event_loop.run_in_executor function which allows you to run co-routines in a separate executor - this being a Thread or Processor pool (via the concurrent.futures module):
Important: note that the last argument to run_in_executor is *args, i.e. the arguments to pass to the blocking task. Passing the argument directly (blocking_task(i)) will not work as expected
The text was updated successfully, but these errors were encountered:
Asyncio contains the
event_loop.run_in_executor
function which allows you to run co-routines in a separate executor - this being a Thread or Processor pool (via the concurrent.futures module):Important: note that the last argument to run_in_executor is *args, i.e. the arguments to pass to the blocking task. Passing the argument directly (
blocking_task(i)
) will not work as expectedThe text was updated successfully, but these errors were encountered: