Mark Allanson
06/18/2021, 7:51 AMsupervisorScope
using async
. What is the most efficient way to await for the first failure of any of the jobs? At the moment I am looping the jobs, saving away successes, and capturing the first failure, then when that happens issuing a "controlled cancellation on the others" and using a yield (or delay) inside the tight loop, but it feels like there must be a better way of doing thiscoroutineScope
doesn't work for me here because depending on input I need to either allow the remaining jobs to complete, or force them to fail.ephemient
06/18/2021, 8:43 AMMark Allanson
06/18/2021, 8:46 AM