Hello,

Let's say I have a loop where at each iteration, a task which makes an
HTTP request to some endpoint is generated, and then the loop sleeps
for n seconds. These tasks may throw exceptions.

I can call asyncio.gather on these tasks once the loop has finished,
but I actually want to stop the loop immediately if an exception is
thrown.

Is there a solution that would allow me to stop this loop as soon as
an exception is thrown by any of these request tasks?

Thanks.
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to