Message371439
Thanks for the additional feedback, Caleb.
> I think `gather()` should work the same. It would be confusing if `future_gather.cancelled()` is false if a child is cancelled, while a plain old outer future returns `future.cancelled() == true` if futures that it waits on are cancelled.
Agreed, I think it would make the most sense IMO for the behavior of .cancelled() to be similar for tasks, futures, and for gather itself. So, I'm still inclined towards checking the exception to see if CancelledError occurred for _GatheringFuture.cancelled(), as I think that would result in the most similar behavior.
Currently waiting on feedback from Yury and/or Andrew about the current long-term plans for asyncio.gather(), and their general thoughts on this issue. Unless it is realistically going to be deprecated and effectively replaced with task groups in 3.10, I think the change would make sense. |
|
Date |
User |
Action |
Args |
2020-06-13 05:59:33 | aeros | set | recipients:
+ aeros, asvetlov, cjrh, yselivanov, timmwagener |
2020-06-13 05:59:33 | aeros | set | messageid: <1592027973.8.0.0606707939482.issue40894@roundup.psfhosted.org> |
2020-06-13 05:59:33 | aeros | link | issue40894 messages |
2020-06-13 05:59:33 | aeros | create | |
|