public class YieldKt
Modifier and Type | Method and Description |
---|---|
static java.lang.Object |
yield(kotlin.coroutines.experimental.Continuation<? super kotlin.Unit> p)
Yields a thread (or thread pool) of the current coroutine dispatcher to other coroutines to run.
If the coroutine dispatcher does not have its own thread pool (like
Dispatchers.getUnconfined ) then this
function does nothing, but checks if the coroutine interface Job was completed.
This suspending function is cancellable.
If the interface Job of the current coroutine is cancelled or completed when this suspending function is invoked or while
this function is waiting for dispatching, it resumes with CancellationException. |
public static java.lang.Object yield(kotlin.coroutines.experimental.Continuation<? super kotlin.Unit> p)
Yields a thread (or thread pool) of the current coroutine dispatcher to other coroutines to run.
If the coroutine dispatcher does not have its own thread pool (like Dispatchers.getUnconfined
) then this
function does nothing, but checks if the coroutine interface Job
was completed.
This suspending function is cancellable.
If the interface Job
of the current coroutine is cancelled or completed when this suspending function is invoked or while
this function is waiting for dispatching, it resumes with CancellationException.
Dispatchers.getUnconfined
,
interface Job
,
interface Job