https://kotlinlang.org logo
#coroutines
Title
# coroutines
e

elizarov

01/23/2017, 7:23 AM
Yes. That is what you do:
Copy code
fun sendEmailAsync(params: Params): CompletableFuture<Result> {
    val pp = doSomePrepwork(params) // non-blocking
    return makeSomeRestCallAsync(pp).thenApply { ir ->
        doSomePostProcessing(ir) // non-blocking
    }
}