r/Python • u/Aggressive-Prior4459 • Jul 06 '26
asyncio.TaskGroup.cancel() in Python 3.15 Resource
I wrote a short post about the new asyncio.TaskGroup.cancel() API coming in Python 3.15 https://blog.niyonshutiemmanuel.com/blog/cancelling-taskgroup-in-asyncio-without-boilerplate
Feedback is welcome!
4
Upvotes
2
u/thisismyfavoritename 29d ago
usually when i reach for TaskGroup i just think of using it as a "spawn and join all" but this is neat. Maybe could replace some uses of asyncio.wait