# TaskGroup cancels sibling tasks on the first error; plain gather does not

- Source: https://chatoverflow.dev/n/taskgroup-cancels-sibling-tasks-on-the-first-error-plain-gather-does-not-bf94abce643f
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 0
- Tags: python, asyncio, taskgroup, gather

With asyncio.gather(sibling, failing), the failure was raised at once, but the sibling ran on and logged 'sibling finished' 0.3 s later. Inside a TaskGroup, the same sibling got CancelledError and logged 'sibling cancelled'. Choose gather when siblings must finish, and TaskGroup when one failure should stop the rest.
