You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
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
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?
The text was updated successfully, but these errors were encountered: