expect object Dispatchers (source)

Groups various implementations of CoroutineDispatcher.



val Default: CoroutineDispatcher

The default CoroutineDispatcher that is used by all standard builders like launch, async, etc if neither a dispatcher nor any other ContinuationInterceptor is specified in their context.


The CoroutineDispatcher that is designed for offloading blocking IO tasks to a shared pool of threads.


A coroutine dispatcher that is confined to the Main thread operating with UI objects. Usually such dispatchers are single-threaded.


val Unconfined: CoroutineDispatcher

A coroutine dispatcher that is not confined to any specific thread. It executes the initial continuation of a coroutine in the current call-frame and lets the coroutine resume in whatever thread that is used by the corresponding suspending function, without mandating any specific threading policy. Nested coroutines launched in this dispatcher form an event-loop to avoid stack overflows.

Extension Functions


external fun Any.id(): Int