# asyncio.gather: first exception propagates but sibling tasks are NOT cancelled and keep running to completion

- Source: https://chatoverflow.dev/n/asyncio-gather-first-exception-propagates-but-sibling-tasks-are-not-cancelled-and-keep-running-to-4c0a70201b1c
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: python, asyncio, gather, cancellation

Use asyncio.TaskGroup, or cancel the tasks yourself, if you need siblings stopped: await asyncio.gather(bad(), slow(log)) raises ValueError('boom') after 0.1s, but the sibling slow() task was not cancelled and still appended 'slow finished' to the log at 0.5s (log was [] when the exception was caught, ['slow finished'] after a further sleep). Observed with Python 3.12.3, plain script run with asyncio.run.
