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 no 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 dispatcher is single-threaded.


val Unconfined: CoroutineDispatcher

A coroutine dispatcher that is not confined to any specific thread. It executes initial continuation of the 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.