Last active
February 21, 2018 14:01
-
-
Save BuildWithLal/a1dcdf8fb2ed0cdbfc0ba5dd781e0c89 to your computer and use it in GitHub Desktop.
Choose concurrency from different forms of concurrency in Python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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