mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-08 18:13:59 +07:00
In some cases Tasks can be created to run in background without awaiting. Disable inspection for functions, which return Task and for builtin functions which schedule function run in a loop without await.
15 lines
220 B
Python
15 lines
220 B
Python
import asyncio
|
|
|
|
|
|
async def nested():
|
|
print("42")
|
|
|
|
|
|
async def main():
|
|
# Schedule nested() to run soon concurrently with "main()".
|
|
asyncio.create_task(nested())
|
|
await asyncio.sleep(3)
|
|
|
|
|
|
asyncio.run(main())
|