Skip to content

Instantly share code, notes, and snippets.

@sguzman
Created October 9, 2018 05:34
Show Gist options
  • Save sguzman/049c112c7ca8ae2c1e49dd4685f10855 to your computer and use it in GitHub Desktop.
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
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