gh-91048: Improve example in `asyncio-graph.rst` doc (#129224)

This commit is contained in:
sobolevn 2025-01-23 21:08:51 +03:00 committed by GitHub
parent 0b15d9c0d2
commit c05a851ac5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -59,13 +59,13 @@ and debuggers.
async def main():
async with asyncio.TaskGroup() as g:
g.create_task(test())
g.create_task(test(), name='test')
asyncio.run(main())
will print::
* Task(name='Task-2', id=0x1039f0fe0)
* Task(name='test', id=0x1039f0fe0)
+ Call stack:
| File 't2.py', line 4, in async test()
+ Awaited by: