jakub.dyszkiewicz
02/01/2018, 10:41 AMthenApply
like this is possible
CompletableFuture.completedFuture("x").thenApply { it }
but second version with executor
CompletableFuture.completedFuture("x").thenApply({ it }, Executors.newCachedThreadPool())
throws compilation error and I have to do something like this
CompletableFuture.completedFuture("x").thenApply(java.util.Function<String, String> { it }, Executors.newCachedThreadPool())
leosan
02/01/2018, 10:47 AMCompletableFuture.completedFuture(“x”).thenApplyAsync({ it }) { Executors.newCachedThreadPool() }
jakub.dyszkiewicz
02/01/2018, 10:50 AMthenApply
does not receive two functions, just one and executor, so this is not correctleosan
02/01/2018, 10:52 AMthenApplyAsync
i seemzgreen
02/01/2018, 10:53 AMleosan
02/01/2018, 10:53 AM