poc in folder

This commit is contained in:
Louis Auzuret
2022-05-05 11:26:57 +02:00
parent 4e9ad2a05f
commit cc85121465
20 changed files with 0 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
import asyncio
async def nested():
return 42
async def main():
# Schedule nested() to run soon concurrently
# with "main()".
task = asyncio.create_task(nested())
# "task" can now be used to cancel "nested()", or
# can simply be awaited to wait until it is complete:
await task
asyncio.run(main())