New submission from Alexander Mohr <>:

currently gather/wait allow you to return on the first exception and leave the 
children executing.

A very common use case that I have is of launching multiple tasks, and if any 
of them fail, then all should fail..otherwise the other tasks would continue 
running w/o anyone listening for the results.  To accomplish this I wrote a 
method like the following:  I think it 
would be useful to many others as on optional perhaps a parameter to each of 
these methods.

What do you guys think?

components: asyncio
messages: 311527
nosy: asvetlov, thehesiod, yselivanov
priority: normal
severity: normal
status: open
title: feature request: asyncio.gather/wait cancel children on first exception
versions: Python 3.8

Python tracker <>
Python-bugs-list mailing list

Reply via email to