90
Suppose I have several futures and need to wait until either any of them fails or all of them succeed.
For example: Let there are 3 futures: f1, f2, f3.
If
f1succeeds andf2fails I do not wait forf3(and return failure to the client).If
f2fails whilef1andf3are still running I do not wait for them (and return failure)If
f1succeeds and thenf2succeeds I continue waiting forf3.
How would you implement it?