See: Description
Interface | Description |
---|---|
CancellableContinuation<T> |
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. |
CompletableDeferred<T> |
A
interface Deferred that can be completed via public functions CompletableDeferred.complete or Job.cancel . |
CoroutineExceptionHandler |
An optional element in the coroutine context to handle uncaught exceptions.
|
CoroutineScope |
Defines a scope for new coroutines. Every coroutine builder
is an extension on
interface CoroutineScope and inherits its CoroutineScope.getCoroutineContext
to automatically propagate both context elements and cancellation. |
Deferred<T> |
Deferred value is a non-blocking cancellable future — it is a
interface Job that has a result. |
DisposableHandle |
A handle to an allocated object that can be disposed to make it eligible for garbage collection.
|
ExperimentalCoroutinesApi |
Marks declarations that are still experimental in coroutines API, which means that the design of the
corresponding declarations has open issues which may (or may not) lead to their changes in the future.
Roughly speaking, there is a chance that those declarations will be deprecated in the near future or
the semantics of their behavior may change in some way that may break some code.
|
Job |
A background job. Conceptually, a job is a cancellable thing with a life-cycle that
culminates in its completion.
|
ObsoleteCoroutinesApi |
Marks declarations that are obsolete in coroutines API, which means that the design of the corresponding
declarations has serious known flaws and they will be redesigned in the future.
Roughly speaking, these declarations will be deprecated in the future but there is no replacement for them yet,
so they cannot be deprecated right away.
|
ThreadContextElement<S> |
Defines elements in CoroutineContext that are installed into thread context
every time the coroutine with this element in the context is resumed on a thread.
|
Class | Description |
---|---|
AwaitKt | |
BuildersKt | |
CancellableContinuationImplKt | |
CancellableContinuationKt | |
CompletableDeferredKt | |
CompletedExceptionallyKt | |
CompletionHandlerKt | |
CompletionHandler_commonKt | |
CoroutineContextKt | |
CoroutineDispatcher |
Base class that shall be extended by all coroutine dispatcher implementations.
|
CoroutineExceptionHandlerImplKt | |
CoroutineExceptionHandlerKt | |
CoroutineName |
User-specified name of coroutine. This name is used in debugging mode.
See newCoroutineContext for the description of coroutine debugging facilities.
|
CoroutineScopeKt | |
DebugKt | |
DefaultExecutorKt | |
DelayKt | |
DispatchedKt | |
Dispatchers |
Groups various implementations of
class CoroutineDispatcher . |
DispatchersKt | |
EventLoopKt | |
ExceptionsKt | |
ExecutorCoroutineDispatcher |
class CoroutineDispatcher that has underlying Executor for dispatching tasks.
Instances of class ExecutorCoroutineDispatcher should be closed by the owner of the dispatcher. |
ExecutorsKt | |
GlobalScope |
A global
interface CoroutineScope not bound to any job. |
JobKt | |
JobSupportKt | |
MainCoroutineDispatcher |
Base class for special
class CoroutineDispatcher which is confined to application "Main" or "UI" thread
and used for any UI-based activities. Instance of MainDispatcher can be obtained by Dispatchers.getMain . |
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. |
ResumeModeKt | |
RunnableKt | |
SchedulerTaskKt | |
SupervisorKt | |
ThreadContextElementKt | |
ThreadPoolDispatcherKt | |
TimeSourceKt | |
TimeoutKt | |
YieldKt |
Enum | Description |
---|---|
CoroutineStart |
Defines start options for coroutines builders.
It is used in
start parameter of BuildersKt.launch , BuildersKt.async , and other coroutine builder functions. |
Exception | Description |
---|---|
TimeoutCancellationException |
This exception is thrown by
TimeoutKt.withTimeout to indicate timeout. |
General-purpose coroutine builders, contexts, and helper functions.