Skip to content

Instantly share code, notes, and snippets.

@mturoci
Created September 20, 2022 16:21
Show Gist options
  • Save mturoci/42b8203ceb69c7854975eca478c87c85 to your computer and use it in GitHub Desktop.
Save mturoci/42b8203ceb69c7854975eca478c87c85 to your computer and use it in GitHub Desktop.
# Get the current event loop to update UI later.
loop = asyncio.get_event_loop()
with concurrent.futures.ThreadPoolExecutor() as pool:
await q.exec(pool, download, q, loop)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment