You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* when it completes. Note that the result of `withContext` invocation is
) says:
Note that the result of withContext invocation is dispatched into the original context in a cancellable way with a prompt cancellation guarantee,
which means that if the original [coroutineContext], in which withContext was invoked,
is cancelled by the time its dispatcher starts to execute the code,
it discards the result of withContext and throws [CancellationException].
Uh oh!
There was an error while loading. Please reload this page.
KDoc for the withContext function (
kotlinx.coroutines/kotlinx-coroutines-core/common/src/Builders.common.kt
Line 131 in 865c229
But this example https://github.com/Kotlin/kotlinx.coroutines/blob/master/kotlinx-coroutines-core/jvm/test/guide/example-cancel-05.kt
shows that even if the job is cancelled, "withContext" (in the finally block) starts normally.
I even checked this adding two lines inside finally block:
and get this:
As I understand, either documentation or behavior should be changed.
The text was updated successfully, but these errors were encountered: