Created
April 10, 2021 00:09
-
-
Save thejohnfreeman/d7c55844da23a4157a710dec7f0c829c to your computer and use it in GitHub Desktop.
This file contains 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
import asyncio | |
async def message(delay): | |
await asyncio.sleep(delay) | |
print(delay, flush=True) | |
async def main(): | |
task = asyncio.create_task(message(2)) | |
await message(1) | |
asyncio.run(main()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment