https://kotlinlang.org logo
p

pniederw

12/22/2016, 11:05 AM
here is what I have now (for CompletableFuture):
Copy code
suspend fun <V1, V2> awaitBoth(f1: CompletableFuture<V1>, f2: CompletableFuture<V2>): Pair<V1, V2> =
    await(CompletableFuture.allOf(f1, f2).thenApply { f1.get() to f2.get() })