Message413890
An example would be like:
tg = asyncio.TaskGroup()
...
async with tg:
with asyncio.TaskGroupBinder(tg): # just a hypothetical API
asyncio.create_task(...) # equivalent to tg.create_task(...)
await some_library.some_work() # all tasks are bound to tg
asyncio.create_task(...) # fire-and-forget (not bound to tg)
If TaskGroup supports enumeration/counting of its own tasks and asyncio allows enumeration of TaskGroups just like asyncio.Task.all_tasks(), we could extend aiomonitor to provide per-taskgroup statistics.
In my projects, we have multiple cases to find and fix bugs in customer sites using aiomonitor and I'm willing to improve aiomonitor to support task groups as well. |
|
Date |
User |
Action |
Args |
2022-02-24 07:27:33 | achimnol | set | recipients:
+ achimnol, gvanrossum, asvetlov, yselivanov |
2022-02-24 07:27:33 | achimnol | set | messageid: <1645687653.86.0.836954881.issue46844@roundup.psfhosted.org> |
2022-02-24 07:27:33 | achimnol | link | issue46844 messages |
2022-02-24 07:27:33 | achimnol | create | |
|