Skip to content

Commit 716d21c

Browse files
authored
Fix docs for CancellableContinuation (Kotlin#2112)
Basically reverts the documentation update in commit 49b6305 due to the changes in commit 876e9ba
1 parent e60bcbd commit 716d21c

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

kotlinx-coroutines-core/common/src/CancellableContinuation.kt

+2-4
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,8 @@ import kotlin.coroutines.intrinsics.*
2828
*
2929
* A [cancelled][isCancelled] continuation implies that it is [completed][isCompleted].
3030
*
31-
* Invocation of [resume] or [resumeWithException] in _resumed_ state produces an [IllegalStateException].
32-
* Invocation of [resume] in _cancelled_ state is ignored (it is a trivial race between resume from the continuation owner and
33-
* outer job's cancellation, and the cancellation wins).
34-
* Invocation of [resumeWithException] in _cancelled_ state triggers exception handling of the passed exception.
31+
* Invocation of [resume] or [resumeWithException] in _resumed_ state produces an [IllegalStateException],
32+
* but is ignored in _cancelled_ state.
3533
*
3634
* ```
3735
* +-----------+ resume +---------+

0 commit comments

Comments
 (0)