File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
kotlinx-coroutines-core/common/src Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -133,6 +133,10 @@ private class LazyDeferredCoroutine<T>(
133
133
* which means that if the original [coroutineContext], in which `withContext` was invoked,
134
134
* is cancelled by the time its dispatcher starts to execute the code,
135
135
* it discards the result of `withContext` and throws [CancellationException].
136
+ *
137
+ * The cancellation behaviour described above is enabled if and only if the dispatcher is being changed.
138
+ * For example, when using `withContext(NonCancellable) { ... }` there is no change in dispatcher and
139
+ * this call will not be cancelled neither on entry to the block inside `withContext` nor on exit from it.
136
140
*/
137
141
public suspend fun <T > withContext (
138
142
context : CoroutineContext ,
You can’t perform that action at this time.
0 commit comments