Join Slack
<@U2E974ELT> oh ok, I didn't know the behavior of `withContext` was different, is that difference do...
# coroutines
b
bj0
02/27/2018, 4:15 PM
@elizarov
oh ok, I didn't know the behavior of
withContext
was different, is that difference documented?
e
elizarov
02/27/2018, 7:01 PM
Yes. In their respective docs. It is worth mentioning somewhere else, too, though
elizarov
02/27/2018, 7:02 PM
You don’t have to memorize that, through. Just note the fact that both
launch
and
async
are regular (non suspending), while
withContext
is a suspending function. All suspending functions respect the cancellation of the context they are invoked in.
b
bj0
02/27/2018, 7:04 PM
Ah yea, that makes sense
Open in Slack
Previous
Next
kotlinlang
A modern programming language that makes developers happier.
Powered by