Skip to content

Instantly share code, notes, and snippets.

@mturoci
Created September 20, 2022 16:21
Show Gist options
  • Save mturoci/a53a79e726007928adc9bcc34b831078 to your computer and use it in GitHub Desktop.
Save mturoci/a53a79e726007928adc9bcc34b831078 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