Sep-16-2024, 10:00 PM
I understand the arguments for using the newer
However,
If
TaskGroup in place of older mechanisms based on create_task().However,
TaskGroup exits after all tasks are done. What if you want to start processing the results as soon as the first task finishes, like you can with asyncio.as_completed() or asyncio.wait( ..., return_when=FIRST_COMPLETED )?If
TaskGroup offers no way to do that, then isn't using it a trade-off rather than a strict upgrade? 