Skip to content

Instantly share code, notes, and snippets.

@amitnabarro
Last active December 10, 2017 12:03
Show Gist options
  • Save amitnabarro/b3850d5a73696cb5949b58f7fb4a3d7e to your computer and use it in GitHub Desktop.
Save amitnabarro/b3850d5a73696cb5949b58f7fb4a3d7e to your computer and use it in GitHub Desktop.
Simple Asyncio Example
import asyncio
async def greet(name):
print('hello ' + name)
try:
loop = asyncio.get_event_loop()
loop.run_until_complete(greet('world !'))
finally:
loop.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment