In swift, if I have two async tasks I want to run in parallel, but if task A completes successfully first, I want to cancel task B, otherwise I want to await task B completing, and only then raise the error, how would I do that?
I thought a TaskGroup but it didn't seem quite right.