See: Description
| Interface | Description |
|---|---|
| CancellableContinuation<T> |
Cancellable continuation. Its job is completed when it is resumed or cancelled.
When cancel function is explicitly invoked, this continuation immediately resumes with CancellationException or
with the specified cancel cause.
|
| CompletableDeferred<T> |
A
interface Deferred that can be completed via public functions
complete, completeExceptionally, and cancel. |
| CoroutineExceptionHandler |
An optional element on the coroutine context to handle uncaught exceptions.
|
| CoroutineScope |
Receiver interface for generic coroutine builders, so that the code inside coroutine has a convenient access
to its coroutineContext and its cancellation status via isActive.
|
| Deferred<T> |
Deferred value is a non-blocking cancellable future.
|
| Delay |
This dispatcher feature is implemented by
class CoroutineDispatcher implementations that natively support
scheduled execution of tasks. |
| DisposableHandle |
A handle to an allocated object that can be disposed to make it eligible for garbage collection.
|
| EventLoop |
Implemented by
class CoroutineDispatcher implementations that have event loop inside and can
be asked to process next event from their event queue. |
| Job |
A background job. Conceptually, a job is a cancellable thing with a simple life-cycle that
culminates in its completion. Jobs can be arranged into parent-child hierarchies where cancellation
or completion of parent immediately cancels all its children.
|
| Class | Description |
|---|---|
| AbstractContinuationKt | |
| BuildersKt | |
| CancellableContinuationKt | |
| CancellableKt | |
| CommonPool |
Represents common pool of shared threads as coroutine dispatcher for compute-intensive tasks.
It uses java.util.concurrent.ForkJoinPool when available, which implements efficient work-stealing algorithm for its queues, so every
coroutine resumption is dispatched as a separate task even when it already executes inside the pool.
When available, it wraps
ForkJoinPool.commonPool and provides a similar shared pool where not. |
| CompletableDeferredKt | |
| CoroutineContextKt | |
| CoroutineDispatcher |
Base class that shall be extended by all coroutine dispatcher implementations.
|
| CoroutineDispatcherKt | |
| CoroutineExceptionHandlerKt | |
| CoroutineName |
User-specified name of coroutine. This name is used in debugging mode.
See newCoroutineContext for the description of coroutine debugging facilities.
|
| DebugKt | |
| DeferredKt | |
| DelayKt | |
| DisposableFutureHandle |
An implementation of
interface DisposableHandle that cancels the specified future on dispose. |
| EventLoopKt | |
| ExecutorsKt | |
| JobKt | |
| LazyDeferredKt | |
| NonCancellable |
A non-cancelable job that is always active. It is designed to be used with run builder
to prevent cancellation of code blocks that need to run without cancellation.
|
| NonDisposableHandle |
No-op implementation of
interface DisposableHandle. |
| ResumeModeKt | |
| ScheduledKt | |
| ThreadPoolDispatcher |
Dispatches coroutine execution to a thread pool of a fixed size. Instances of this dispatcher are
created with newSingleThreadContext and newFixedThreadPoolContext.
|
| ThreadPoolDispatcherKt | |
| TimeSourceKt | |
| Unconfined |
A coroutine dispatcher that is not confined to any specific thread.
It executes initial continuation of the coroutine right here in the current call-frame
and let the coroutine resume in whatever thread that is used by the corresponding suspending function, without
mandating any specific threading policy.
|
| YieldKt |
| Enum | Description |
|---|---|
| CoroutineStart |
Defines start option for coroutines builders.
It is used in
start parameter of launch, async, and actor
coroutine builder functions. |
| Exception | Description |
|---|---|
| CompletionHandlerException |
This exception gets thrown if an exception is caught while processing CompletionHandler invocation for
interface Job. |
| JobCancellationException |
Thrown by cancellable suspending functions if the
interface Job of the coroutine is cancelled or completed
without cause, or with a cause or exception that is not CancellationException
(see Job.getCancellationException). |
| TimeoutCancellationException |
This exception is thrown by withTimeout to indicate timeout.
|
General-purpose coroutine builders, contexts, and helper functions.