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

jw

10/06/2017, 1:15 PM
Even inside
suspendCoroutine
? That means that block finished executing before the result is returned?
e

elizarov

10/06/2017, 2:13 PM
resume
invocation has to return at some moment, because it has to unwind Java stack. When exactly it returns depends on dispatcher. With a regular dispatcher it returns almost immediately, having scheduled the execution of continuation to the appropriate thread, while with
Unconfined
dispatcher it returns when the resumed coroutine reaches its next suspension point.
j

jw

10/06/2017, 5:34 PM
Yeah the stack part makes sense when I start to think about it
3 Views