gh-98641: Task group vs gather#103644
Conversation
The purpose of the comments is to rule out the implication that asyncio.TaskGroup is a drop-in replacement / better alternative to asyncio.gather(). Both have their idiomatic uses cases, and asyncio.gather() works well for tasks that do not schedule tasks themselves, especially when the caller needs to consume their result as soon as possible.
d02025a to
c8ae877
Compare
I disagree with this part of your proposed commit message, so I removed it. I don't see any mention of this opinion in the changes themselves to I merged your PR. Thanks for your contribution! The docs are better now. |
Thanks. For my education, what's the status of |
|
I have no desire to deprecate |
The purpose of this PR is to clarify the difference(s) between TaskGroup and gather. There are two possibilities:
The end result should better reflect the point of maintaining the two approaches side by side in Python for the years to come, as it has significant impact on the habits that people might develop when writing concurrent Python.
I apologize for not responding to the events that lead to the closing of the Issue referenced below, I was busy on other things. Having my PR + accompanying Issue closed were a good wake-up call.