Paul Woitaschek
03/06/2018, 4:20 PMJonathan
03/06/2018, 4:22 PMCompletionStage.await
or CompletionStage.asDeferred()
Paul Woitaschek
03/06/2018, 4:22 PMJonathan
03/06/2018, 4:23 PMjava.util.concurrent.Future
tooJonathan
03/06/2018, 4:27 PMPaul Woitaschek
03/06/2018, 4:28 PMPaul Woitaschek
03/06/2018, 4:28 PMJonathan
03/06/2018, 4:29 PMjava.util.concurrent.Future
implement CompletionStage
but only since Java8Jonathan
03/06/2018, 4:30 PMawait
on CompletionStage
. But you have to add kotlinx-coroutines-jdk8
as a dependency of your projectJonathan
03/06/2018, 4:37 PMJonathan
03/06/2018, 4:38 PMjava.util.concurrent.Future
your only option is to create a task to wait on the result: async { future.get() }