Skip to content

Instantly share code, notes, and snippets.

@kunigami
Last active February 2, 2020 04:48
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 kunigami/602a3c1a1a436209961bfd4e7c473244 to your computer and use it in GitHub Desktop.
Save kunigami/602a3c1a1a436209961bfd4e7c473244 to your computer and use it in GitHub Desktop.
# Python 3.7+
import asyncio
async def sleep(id):
print("will sleep", id)
await asyncio.sleep(4)
print("slept", id)
async def main():
await sleep(1)
await sleep(2)
asyncio.run(main())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment