What is asyncio.TaskGroup?
Asynchronous programming and asyncio
Audio flashcard · 0:17Nortren·
What is asyncio.TaskGroup?
0:17
TaskGroup, added in Python 3.11, is a structured concurrency primitive. It is an async context manager that ensures all tasks created within it are awaited before exiting. If any task raises, others are cancelled and exceptions are collected into an exception group. TaskGroup is the recommended modern way to manage concurrent tasks.
docs.python.org