Skip to content

Instantly share code, notes, and snippets.

@jasmine-k
Created March 26, 2018 11:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jasmine-k/9b92699f47174a64d352fafcefbf5696 to your computer and use it in GitHub Desktop.
Save jasmine-k/9b92699f47174a64d352fafcefbf5696 to your computer and use it in GitHub Desktop.
combinedFuture.thenApply(v ->
Stream.of(completableFuture1, completableFuture2, completableFuture3).
map(CompletableFuture::join).
collect(Collectors.toList()));
String combined = Stream.of(completableFuture1, completableFuture2, completableFuture3)
.map(CompletableFuture::join)
.collect(Collectors.joining(" "));
System.out.println(combined); // Hello Knolders! Its allOf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment