-
public class DispatcherProvider
-
-
Field Summary
Fields Modifier and Type Field Description private CoroutineDispatcherMainprivate final CoroutineDispatcherImmediateprivate CoroutineDispatcherIOpublic final static DispatcherProviderINSTANCE
-
Method Summary
Modifier and Type Method Description final Unitset(CoroutineDispatcher mainDispatcher, CoroutineDispatcher ioDispatcher)Overrides the main (UI thread) and IO dispatcher. final Unitreset()Resets the dispatchers to their default values. final CoroutineDispatchergetMain()Represents the Main coroutine dispatcher, tied to the UI thread. final UnitsetMain(CoroutineDispatcher Main)final CoroutineDispatchergetImmediate()final CoroutineDispatchergetIO()Represents the IO coroutine dispatcher, which is usually tied to background work. final UnitsetIO(CoroutineDispatcher IO)-
-
Method Detail
-
set
final Unit set(CoroutineDispatcher mainDispatcher, CoroutineDispatcher ioDispatcher)
Overrides the main (UI thread) and IO dispatcher. For testing purposes only.
-
getMain
final CoroutineDispatcher getMain()
Represents the Main coroutine dispatcher, tied to the UI thread.
-
getImmediate
final CoroutineDispatcher getImmediate()
-
getIO
final CoroutineDispatcher getIO()
Represents the IO coroutine dispatcher, which is usually tied to background work.
-
-
-
-