Skip to content

Instantly share code, notes, and snippets.

@lalatgithub
Last active February 21, 2018 14:01
Show Gist options
  • Save lalatgithub/a1dcdf8fb2ed0cdbfc0ba5dd781e0c89 to your computer and use it in GitHub Desktop.
Save lalatgithub/a1dcdf8fb2ed0cdbfc0ba5dd781e0c89 to your computer and use it in GitHub Desktop.
Choose concurrency from different forms of concurrency in Python
def choose_concurrency():
if io_bound:
if io_very_slow:
print("Use Asyncio")
else:
print("Use Threads")
else:
print("Multi Processing")
choose_concurrency()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment