- cancel(cause) - Method in interface kotlinx.coroutines.CancellableContinuation
-
Cancels this continuation with an optional cancellation cause. The result is true
if this continuation was
cancelled as a result of this invocation and false
otherwise.
- cancel(cause) - Method in interface kotlinx.coroutines.channels.BroadcastChannel
-
Cancels reception of remaining elements from this channel. This function closes the channel with
the specified cause (unless it was already closed), removes all buffered sent elements from it,
and
ReceiveChannel.cancel
all open subscriptions.
This function returns
true
if the channel was not closed previously, or
false
otherwise.
- cancel(cause) - Method in class kotlinx.coroutines.channels.ConflatedBroadcastChannel
-
- cancel() - Method in interface kotlinx.coroutines.channels.ReceiveChannel
-
Cancels reception of remaining elements from this channel. This function closes the channel
and removes all buffered sent elements from it.
- cancel($receiver) - Static method in class kotlinx.coroutines.CoroutineScopeKt
-
Cancels this scope, including its job and all its children.
Throws
IllegalStateException if the scope does not have a job in it.
- cancel() - Method in interface kotlinx.coroutines.Job
-
Cancels this job.
See
interface Job
documentation for full explanation of cancellation machinery.
- cancel($receiver) - Static method in class kotlinx.coroutines.JobKt
-
- cancelAllActions() - Method in class kotlinx.coroutines.test.TestCoroutineContext
-
Cancels all not yet triggered actions. Be careful calling this, since it can seriously
mess with your coroutines work. This method should usually be called on tear-down of a
unit test.
- cancelAndJoin($receiver, p) - Static method in class kotlinx.coroutines.JobKt
-
Cancels the job and suspends invoking coroutine until the cancelled job is complete.
- cancelChildren($receiver) - Static method in class kotlinx.coroutines.JobKt
-
Cancels all children of the
interface Job
in this context, without touching the the state of this job itself.
It does not do anything if there is no job in the context or it has no children.
- cancelChildren($receiver, cause) - Static method in class kotlinx.coroutines.JobKt
-
Deprecated.
- cancelChildren($receiver) - Static method in class kotlinx.coroutines.JobKt
-
- cancelFutureOnCancellation($receiver, future) - Static method in class kotlinx.coroutines.JobKt
-
Cancels a specified future when this job is cancelled.
This is a shortcut for the following code with slightly more efficient implementation (one fewer object created).
- CancellableContinuation<T> - Interface in kotlinx.coroutines
-
Cancellable continuation. It is
completed when it is resumed or cancelled.
When
CancellableContinuation.cancel
function is explicitly invoked, this continuation immediately resumes with CancellationException or
with the specified cancel cause.
- CancellableContinuationImplKt - Class in kotlinx.coroutines
-
- CancellableContinuationKt - Class in kotlinx.coroutines
-
- Channel<E> - Interface in kotlinx.coroutines.channels
-
- Channel(capacity) - Static method in class kotlinx.coroutines.channels.ChannelKt
-
Creates a channel with the specified buffer capacity (or without a buffer by default).
See
interface Channel
interface documentation for details.
- Channel.Factory - Class in kotlinx.coroutines.channels
-
Constants for channel factory function Channel()
.
- ChannelIterator<E> - Interface in kotlinx.coroutines.channels
-
Iterator for
interface ReceiveChannel
. Instances of this interface are
not thread-safe and shall not be used
from concurrent coroutines.
- ChannelKt - Class in kotlinx.coroutines.channels
-
- ChannelsKt - Class in kotlinx.coroutines.channels
-
- close(cause) - Method in class kotlinx.coroutines.channels.ConflatedBroadcastChannel
-
Closes this channel.
This is an idempotent operation -- repeated invocations of this function have no effect and return false
.
Conceptually, its sends a special "close token" over this channel.
- close(cause) - Method in interface kotlinx.coroutines.channels.SendChannel
-
Closes this channel.
This is an idempotent operation -- repeated invocations of this function have no effect and return false
.
Conceptually, its sends a special "close token" over this channel.
- close() - Method in class kotlinx.coroutines.ExecutorCoroutineDispatcher
-
Closes this coroutine dispatcher and shuts down its executor.
- ClosedReceiveChannelException - Exception in kotlinx.coroutines.channels
-
- ClosedReceiveChannelException(message) - Constructor for exception kotlinx.coroutines.channels.ClosedReceiveChannelException
-
- ClosedSendChannelException - Exception in kotlinx.coroutines.channels
-
- ClosedSendChannelException(message) - Constructor for exception kotlinx.coroutines.channels.ClosedSendChannelException
-
- Companion - Static variable in class kotlinx.coroutines.channels.ConflatedBroadcastChannel
-
Deprecated.
- CompletableDeferred<T> - Interface in kotlinx.coroutines
-
- CompletableDeferred(parent) - Static method in class kotlinx.coroutines.CompletableDeferredKt
-
- CompletableDeferred(value) - Static method in class kotlinx.coroutines.CompletableDeferredKt
-
- CompletableDeferredKt - Class in kotlinx.coroutines
-
- complete(value) - Method in interface kotlinx.coroutines.CompletableDeferred
-
Completes this deferred value with a given value. The result is true
if this deferred was
completed as a result of this invocation and false
otherwise (if it was already completed).
- CompletedExceptionallyKt - Class in kotlinx.coroutines
-
- completeExceptionally(exception) - Method in interface kotlinx.coroutines.CompletableDeferred
-
Completes this deferred value exceptionally with a given exception. The result is true
if this deferred was
completed as a result of this invocation and false
otherwise (if it was already completed).
- CompletionHandler_commonKt - Class in kotlinx.coroutines
-
- CompletionHandlerKt - Class in kotlinx.coroutines
-
- component1() - Method in class kotlinx.coroutines.CoroutineName
-
User-defined coroutine name.
- CONFLATED - Static variable in interface kotlinx.coroutines.channels.Channel
-
Requests conflated channel in Channel(...)
factory function -- the ConflatedChannel
gets created.
- CONFLATED - Static variable in class kotlinx.coroutines.channels.Channel.Factory
-
Requests conflated channel in Channel(...)
factory function -- the ConflatedChannel
gets created.
- ConflatedBroadcastChannel<E> - Class in kotlinx.coroutines.channels
-
- ConflatedBroadcastChannel() - Constructor for class kotlinx.coroutines.channels.ConflatedBroadcastChannel
-
- ConflatedBroadcastChannel(value) - Constructor for class kotlinx.coroutines.channels.ConflatedBroadcastChannel
-
Creates an instance of this class that already holds a value.
- consume($receiver, block) - Static method in class kotlinx.coroutines.channels.ChannelsKt
-
- consume($receiver, block) - Static method in class kotlinx.coroutines.channels.ChannelsKt
-
Makes sure that the given block consumes all elements from the given channel
by always invoking
ReceiveChannel.cancel
after the execution of the block.
- consumes($receiver) - Static method in class kotlinx.coroutines.channels.ChannelsKt
-
- consumesAll(channels) - Static method in class kotlinx.coroutines.channels.ChannelsKt
-
- copy(name) - Method in class kotlinx.coroutines.CoroutineName
-
User-specified name of coroutine. This name is used in debugging mode.
See newCoroutineContext for the description of coroutine debugging facilities.
- CoroutineContextKt - Class in kotlinx.coroutines
-
- CoroutineDispatcher - Class in kotlinx.coroutines
-
Base class that shall be extended by all coroutine dispatcher implementations.
- CoroutineDispatcher() - Constructor for class kotlinx.coroutines.CoroutineDispatcher
-
Base class that shall be extended by all coroutine dispatcher implementations.
- CoroutineExceptionHandler - Interface in kotlinx.coroutines
-
An optional element in the coroutine context to handle uncaught exceptions.
- CoroutineExceptionHandler(handler) - Static method in class kotlinx.coroutines.CoroutineExceptionHandlerKt
-
- CoroutineExceptionHandler.Key - Class in kotlinx.coroutines
-
- CoroutineExceptionHandlerImplKt - Class in kotlinx.coroutines
-
- CoroutineExceptionHandlerKt - Class in kotlinx.coroutines
-
- CoroutineName - Class in kotlinx.coroutines
-
User-specified name of coroutine. This name is used in debugging mode.
See newCoroutineContext for the description of coroutine debugging facilities.
- CoroutineName(name) - Constructor for class kotlinx.coroutines.CoroutineName
-
User-specified name of coroutine. This name is used in debugging mode.
See newCoroutineContext for the description of coroutine debugging facilities.
- CoroutineName.Key - Class in kotlinx.coroutines
-
- CoroutineScope - Interface in kotlinx.coroutines
-
- coroutineScope(block, p) - Static method in class kotlinx.coroutines.CoroutineScopeKt
-
- CoroutineScope(context) - Static method in class kotlinx.coroutines.CoroutineScopeKt
-
- CoroutineScopeKt - Class in kotlinx.coroutines
-
- CoroutineStart - Enum in kotlinx.coroutines
-
- CoroutineStart() - Constructor for enum kotlinx.coroutines.CoroutineStart
-
- count($receiver, p) - Static method in class kotlinx.coroutines.channels.ChannelsKt
-
Returns the number of elements in this channel.
- DEBUG_PROPERTY_NAME - Static variable in class kotlinx.coroutines.DebugKt
-
Name of the property that controls coroutine debugging. See newCoroutineContext.
- DEBUG_PROPERTY_VALUE_AUTO - Static variable in class kotlinx.coroutines.DebugKt
-
Automatic debug configuration value for DEBUG_PROPERTY_NAME. See newCoroutineContext.
- DEBUG_PROPERTY_VALUE_OFF - Static variable in class kotlinx.coroutines.DebugKt
-
Debug turned on value for DEBUG_PROPERTY_NAME. See newCoroutineContext.
- DEBUG_PROPERTY_VALUE_ON - Static variable in class kotlinx.coroutines.DebugKt
-
Debug turned on value for DEBUG_PROPERTY_NAME. See newCoroutineContext.
- DebugKt - Class in kotlinx.coroutines
-
- DefaultExecutorKt - Class in kotlinx.coroutines
-
- Deferred<T> - Interface in kotlinx.coroutines
-
Deferred value is a non-blocking cancellable future — it is a
interface Job
that has a result.
- delay(timeMillis, p) - Static method in class kotlinx.coroutines.DelayKt
-
Delays coroutine for a given time without blocking a thread and resumes it after a specified time.
This suspending function is cancellable.
If the
interface Job
of the current coroutine is cancelled or completed while this suspending function is waiting, this function
immediately resumes with CancellationException.
- DelayKt - Class in kotlinx.coroutines
-
- dispatch(context, block) - Method in class kotlinx.coroutines.CoroutineDispatcher
-
Dispatches execution of a runnable block onto another thread in the given context.
- DispatchedKt - Class in kotlinx.coroutines
-
- Dispatchers - Class in kotlinx.coroutines
-
- DispatchersKt - Class in kotlinx.coroutines
-
- DisposableHandle - Interface in kotlinx.coroutines
-
A handle to an allocated object that can be disposed to make it eligible for garbage collection.
- dispose() - Method in interface kotlinx.coroutines.DisposableHandle
-
Disposes the corresponding object, making it eligible for garbage collection.
Repeated invocation of this function has no effect.
- distinct($receiver) - Static method in class kotlinx.coroutines.channels.ChannelsKt
-
Returns a channel containing only distinct elements from the given channel.
- distinctBy($receiver, context, selector) - Static method in class kotlinx.coroutines.channels.ChannelsKt
-
Returns a channel containing only elements from the given channel
having distinct keys returned by the given selector function.
- drop($receiver, n, context) - Static method in class kotlinx.coroutines.channels.ChannelsKt
-
Returns a channel containing all elements except first n elements.
- dropWhile($receiver, context, predicate) - Static method in class kotlinx.coroutines.channels.ChannelsKt
-
Returns a channel containing all elements except first elements that satisfy the given predicate.
- indexOf($receiver, element, p) - Static method in class kotlinx.coroutines.channels.ChannelsKt
-
Returns first index of element, or -1 if the channel does not contain element.
- INSTANCE - Static variable in class kotlinx.coroutines.Dispatchers
-
- INSTANCE - Static variable in class kotlinx.coroutines.GlobalScope
-
- INSTANCE - Static variable in class kotlinx.coroutines.NonCancellable
-
A non-cancelable job that is always
Job.isActive
. It is designed for
BuildersKt.withContext
function
to prevent cancellation of code blocks that need to be executed without cancellation.
- interceptContinuation(continuation) - Method in class kotlinx.coroutines.CoroutineDispatcher
-
Returns continuation that wraps the original continuation, thus intercepting all resumptions.
- invoke($this, $receiver, block) - Static method in class kotlinx.coroutines.selects.SelectBuilder.DefaultImpls
-
Registers clause in this select expression with additional parameter nullable parameter of type P
with the null
value for this parameter that selects value of type Q.
- invoke($receiver, block) - Method in interface kotlinx.coroutines.selects.SelectBuilder
-
Registers clause in this select expression without additional parameters that does not select any value.
- invoke($receiver, block) - Method in interface kotlinx.coroutines.selects.SelectBuilder
-
Registers clause in this select expression without additional parameters that selects value of type Q.
- invoke($receiver, param, block) - Method in interface kotlinx.coroutines.selects.SelectBuilder
-
Registers clause in this select expression with additional parameter of type P that selects value of type Q.
- invoke($receiver, block) - Method in interface kotlinx.coroutines.selects.SelectBuilder
-
Registers clause in this select expression with additional parameter nullable parameter of type P
with the null
value for this parameter that selects value of type Q.
- invokeOnCancellation(handler) - Method in interface kotlinx.coroutines.CancellableContinuation
-
Registers handler that is synchronously invoked once on cancellation (both regular and exceptional) of this continuation.
When the continuation is already cancelled, then the handler is immediately invoked
with cancellation exception. Otherwise, the handler will be invoked once on cancellation if this
continuation is cancelled.
- invokeOnClose(handler) - Method in class kotlinx.coroutines.channels.ConflatedBroadcastChannel
-
- invokeOnClose(handler) - Method in interface kotlinx.coroutines.channels.SendChannel
-
Registers handler which is synchronously invoked once the channel is
SendChannel.close
or receiving side of this channel is
ReceiveChannel.cancel
.
Only one handler can be attached to the channel during channel's lifetime.
Handler is invoked when
SendChannel.isClosedForSend
starts to return
true
.
If channel is already closed, handler is invoked immediately.
- invokeOnCompletion(handler) - Method in interface kotlinx.coroutines.Job
-
Registers handler that is synchronously invoked once on completion of this job.
When job is already complete, then the handler is immediately invoked
with a job's exception or cancellation cause or null
. Otherwise, handler will be invoked once when this
job is complete.
- IO_PARALLELISM_PROPERTY_NAME - Static variable in class kotlinx.coroutines.DispatchersKt
-
Name of the property that defines the maximal number of threads that are used by
Dispatchers.getIO
coroutines dispatcher.
- isActive() - Method in interface kotlinx.coroutines.CancellableContinuation
-
Returns true
when this continuation is active -- it has not completed or cancelled yet.
- isActive($receiver) - Static method in class kotlinx.coroutines.CoroutineScopeKt
-
Returns
true
when current
interface Job
is still active (has not completed and was not cancelled yet).
- isActive() - Method in interface kotlinx.coroutines.Job
-
Returns
true
when this job is active -- it was already started and has not completed nor was cancelled yet.
The job that is waiting for its
Job.getChildren
to complete is still considered to be active if it
was not cancelled nor failed.
- isActive($receiver) - Static method in class kotlinx.coroutines.JobKt
-
Returns
true
when the
interface Job
of the coroutine in this context is still active
(has not completed and was not cancelled yet).
- isCancelled() - Method in interface kotlinx.coroutines.CancellableContinuation
-
- isCancelled() - Method in interface kotlinx.coroutines.Job
-
Returns
true
if this job was cancelled for any reason, either by explicit invocation of
Job.cancel
or
because it had failed or its child or parent was cancelled.
In the general case, it does not imply that the
job has already
Job.isCompleted
, because it may still be finishing whatever it was doing and
waiting for its
Job.getChildren
to complete.
- isClosedForReceive() - Method in interface kotlinx.coroutines.channels.ReceiveChannel
-
- isClosedForSend() - Method in class kotlinx.coroutines.channels.ConflatedBroadcastChannel
-
- isClosedForSend() - Method in interface kotlinx.coroutines.channels.SendChannel
-
- isCompleted() - Method in interface kotlinx.coroutines.CancellableContinuation
-
Returns true
when this continuation has completed for any reason. A continuation
that was cancelled is also considered complete.
- isCompleted() - Method in interface kotlinx.coroutines.Job
-
Returns
true
when this job has completed for any reason. A job that was cancelled or failed
and has finished its execution is also considered complete. Job becomes complete only after
all its
Job.getChildren
complete.
- isDispatchNeeded(context) - Method in class kotlinx.coroutines.CoroutineDispatcher
-
Returns true
if execution shall be dispatched onto another thread.
The default behaviour for most dispatchers is to return true
.
- isEmpty() - Method in interface kotlinx.coroutines.channels.ReceiveChannel
-
- isFull() - Method in class kotlinx.coroutines.channels.ConflatedBroadcastChannel
-
- isFull() - Method in interface kotlinx.coroutines.channels.SendChannel
-
- isLocked() - Method in interface kotlinx.coroutines.sync.Mutex
-
Returns true
when this mutex is locked.
- iterator() - Method in interface kotlinx.coroutines.channels.ReceiveChannel
-
Returns new iterator to receive elements from this channels using
for
loop.
Iteration completes normally when the channel is
ReceiveChannel.isClosedForReceive
without cause and
throws the original
SendChannel.close
cause exception if the channel has
failed.