Enhancement request: Futures.waitForAny() and Futures.waitForAll() #5396
Labels
area-library
core-l
library-async
P2
A bug or feature request we're likely to work on
type-enhancement
A request for a change that isn't a bug
This issue was originally filed by sigma.m...@gmail.com
Scenario
In putting together a response to a request, we dispatch a query to multiple database replicas (servers). As soon as we receive the data from any of them, we can continue with framing our response. Here, we are evidently interested in any one of them finishing, not all.
Request
Rename
Futures.wait(List<Future> l)' to
Futures.waitForAll(List<Future> l)', and introduce a new `Futures.waitForAny(List<Future> l)' to address the above case (and similar ones).The text was updated successfully, but these errors were encountered: