You can cancel all tasks when one task fails when using asyncio.gather() by manually traversing the list of tasks can cancel them manually. This is because we cannot call the cancel() method on the Future object returned from the gather() function when a task fails with an exception because, by the time the exception is […]
Published on November 21, 2022 10:00