Skip to content

Instantly share code, notes, and snippets.

@gbigwood
Last active August 8, 2017 14:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gbigwood/4371ce5a094857a48d1f330082f77ebb to your computer and use it in GitHub Desktop.
Save gbigwood/4371ce5a094857a48d1f330082f77ebb to your computer and use it in GitHub Desktop.
really basic coroutine
import requests
async def requests_coroutine(name, url):
print(name, requests.get(url))
loop = asyncio.get_event_loop()
loop.run_until_complete(requests_coroutine("a", "http://www.google.com"))
loop.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment