Is the example posted at <https://kotlin.github.io...
# coroutines
a
Is the example posted at https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-dispatchers/-unconfined.html correct? How can it print
1 3 2
given that
withContext
returns the
T
from the block, which would be the
Unit
from executing
println(2)
first?
p
I’m no expert, but from what I know, you’re right,
withContext
is a suspend call. Perhaps they’re missing a
launch
to prove their point?