mirror of
https://github.com/python/cpython.git
synced 2025-09-25 01:43:11 +00:00
gh-91048: Improve example in asyncio-graph.rst
doc (#129224)
This commit is contained in:
parent
0b15d9c0d2
commit
c05a851ac5
1 changed files with 2 additions and 2 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue