Created
October 9, 2018 05:34
-
-
Save sguzman/049c112c7ca8ae2c1e49dd4685f10855 to your computer and use it in GitHub Desktop.
Be able to print in a multi-threaded env with a simple call to asyncio
This file contains hidden or 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
async def print_async(*args): | |
print(*args) | |
def p(*args): | |
asyncio.run(print_async(*args)) | |
p('It works') | |
p('Still works') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment