Open Ryanng-zr opened 3 years ago
I believe anyOf would come in handy if you have method chains after it. After any of the cfs is completed, the next method can then run (which is different from allOf, which requires all to be completed). I dont think the order will be fixed because just like allOf, the order changes each time you run it
I'm guessing the choice of return would be arbitrary if both were to be completed at the exact same time, much like a comparator returning 0 for a sort - the order is chosen randomly
Hi, I think that the value which will be returned will not be fixed because the first returned value can vary.
i think if all finishes on the same time then maybe the computer then randomly choose one to proceed to the next round. this anyof is most handy when you just need one value to proceed to the next stage
Hi guys, I am aware that anyOf returns the first value that is completed, however what if all the CompletableFutures complete at the same time? Which value will be returned in this case?