Package com. example. examer. di
Types
Link copied to clipboard
Link copied to clipboard
An interface that defines the different types of dispatchers used with a coroutine. Use StandardDispatchersProvider to get an implementation of DispatcherProvider that contains the default coroutine dispatchers. By depending on an interface instead of the dispatchers directly, it becomes possible to switch out all dispatchers with test dispatchers when running tests.
Link copied to clipboard
Link copied to clipboard
data class StandardDispatchersProvider( val main: MainCoroutineDispatcher = Dispatchers.Main, val io: CoroutineDispatcher = Dispatchers.IO, val default: CoroutineDispatcher = Dispatchers.Default, val unconfined: CoroutineDispatcher = Dispatchers.Unconfined) : DispatcherProvider
Content copied to clipboard
A concrete implementation of DispatcherProvider that contains the default coroutine dispatchers.