Skip to content

Instantly share code, notes, and snippets.

@alfredrichards
Created November 18, 2020 12:31
Show Gist options
  • Save alfredrichards/0f906b35e78747a77d5ff7f4324dac7d to your computer and use it in GitHub Desktop.
Save alfredrichards/0f906b35e78747a77d5ff7f4324dac7d to your computer and use it in GitHub Desktop.
Creating a CompletableFuture of CompletableFutures
// returns a CompletableFuture which completes only when all the completable futures completes
CompletableFuture.allOf(completableFuture1, completableFuture2, ...);
// returns a CompletableFuture which completes when any one of the completable future completes
CompletableFuture.anyOf(completableFuture1, completableFuture2, ...);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment