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

Mohamed Ibrahim

02/19/2020, 2:07 PM
Could anyone explain simply what the responsiblity of the
continuation
object which is passed around with suspend functions?
d

diesieben07

02/19/2020, 2:09 PM
suspend
functions are compiled to a normal function which takes a callback.
Continuation
is that callback. Effectively under the hood a
suspend
function is called, does some asynchronous work and then invokes the provided callback (aka
Continuation
) when its done.
4 Views