elizarov
10/26/2017, 8:29 AMinvokeOnCompletion
is mostly designed for internal machinery. Franky, I think it should be somehow “hidden” from API to discourage its use from a general-purpose application code, but I don’t know what would be best way to do it. You should define then
to get this “chained” style of programming like this:
fun <T, U> Deferred<T>.then(next: suspend (T) -> U): Deferred<U> = async { next(await()) }
We might include it in the future updates of kotlinx.coroutines
for convenience.eddie
10/26/2017, 7:53 PMelizarov
10/26/2017, 8:57 PMeddie
10/26/2017, 10:48 PMnext
within the coroutine preceding it?elizarov
10/27/2017, 9:31 AM