SupportDispatcher

data class SupportDispatcher(val main: CoroutineDispatcher = Dispatchers.Main, val computation: CoroutineDispatcher = Dispatchers.Default, val io: CoroutineDispatcher = Dispatchers.IO, val confined: CoroutineDispatcher = newSingleThreadContext("ConfinedContext")) : ISupportDispatcher

Since

v1.2.0

Parameters

main

Context that is confined to the Main thread operating with UI objects

computation

Context that is used by all standard builders, It is backed by a shared pool of threads on JVM. By default, the maximal level of parallelism used by this dispatcher is equal to the number of CPU cores, but is at least two.

io

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

confined

Context that is confined to a single thread

Constructors

Link copied to clipboard
constructor(main: CoroutineDispatcher = Dispatchers.Main, computation: CoroutineDispatcher = Dispatchers.Default, io: CoroutineDispatcher = Dispatchers.IO, confined: CoroutineDispatcher = newSingleThreadContext("ConfinedContext"))

Properties

Link copied to clipboard
open override val computation: CoroutineDispatcher
Link copied to clipboard
open override val confined: CoroutineDispatcher
Link copied to clipboard
open override val io: CoroutineDispatcher
Link copied to clipboard
open override val main: CoroutineDispatcher