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
33/* *
44 * Yields a thread (or thread pool) of the current coroutine dispatcher to other coroutines to run.
55 * 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 .
77 * 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].
1010 */
1111suspend fun yield (): Unit = suspendCancellableCoroutine sc@ { cont ->
1212 (cont as SafeCancellableContinuation ).resumeYield(Unit )
You can’t perform that action at this time.
0 commit comments