Skip to content
Preptima
hardConceptCodingDesignMidSeniorStaff

You run ten coroutines concurrently and one of them raises. What happens to the other nine?

5 min readUpdated 2026-08-15

Answer

Short answer

With gather they keep running unsupervised and their failures may surface as an unretrieved-exception warning.11, cancels the siblings, waits for them to finish unwinding, and raises an ExceptionGroup you handle with except*.

Mention task groups where it changes the risk, the owner, or the next check. A useful task groups point should make the answer more testable, not merely longer.

Was this answer helpful?

Likely follow-ups

  • Why does return_exceptions=True change what the caller sees but not what the tasks do?
  • What is asyncio.shield for, and what does it not protect against?
  • How does asyncio.timeout know to raise TimeoutError rather than propagating CancelledError?
  • What does the "Task exception was never retrieved" warning actually mean?

Related questions

Further reading

Related Topics