Last active
March 26, 2018 11:52
-
-
Save jasmine-k/fd3200964cf633eb6a42400ce41cee28 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static void allOf() { | |
CompletableFuture<String> completableFuture1 | |
= CompletableFuture.supplyAsync(() -> "Hello"); | |
CompletableFuture<String> completableFuture2 | |
= CompletableFuture.supplyAsync(() -> "Knolders!"); | |
CompletableFuture<String> completableFuture3 | |
= CompletableFuture.supplyAsync(() -> "Its allOf"); | |
CompletableFuture<Void> combinedFuture | |
= CompletableFuture.allOf(completableFuture1, completableFuture2, completableFuture3); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment