File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
kotlinx-coroutines-core/src/main/kotlin/kotlinx/coroutines/experimental Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -3,10 +3,10 @@ package kotlinx.coroutines.experimental
3
3
/* *
4
4
* Yields a thread (or thread pool) of the current coroutine dispatcher to other coroutines to run.
5
5
* If the coroutine dispatcher does not have its own thread pool (like [Here] dispatcher) then this
6
- * function does nothing, but checks if the coroutine [Job] was cancelled .
6
+ * function does nothing, but checks if the coroutine [Job] was completed .
7
7
* This suspending function is cancellable.
8
- * If the [Job] of the current coroutine is completed while this suspending function is suspended, this function
9
- * resumes with [CancellationException].
8
+ * If the [Job] of the current coroutine is completed when this suspending function is invoked or while
9
+ * this function is waiting for dispatching, it resumes with [CancellationException].
10
10
*/
11
11
suspend fun yield (): Unit = suspendCancellableCoroutine sc@ { cont ->
12
12
(cont as SafeCancellableContinuation ).resumeYield(Unit )
You can’t perform that action at this time.
0 commit comments