Object DispatcherProvider
-
- All Implemented Interfaces:
public class DispatcherProviderCoroutine dispatchers used internally by Stream libraries. Should always be used instead of directly using Dispatchers or creating new dispatchers.
-
-
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 CoroutineDispatchergetImmediate()final CoroutineDispatchergetIO()Represents the IO coroutine dispatcher, which is usually tied to background work. final CoroutineDispatchergetDefault()final BooleangetInTest()final UnitsetInTest(Boolean inTest)-
-
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.
-
getDefault
final CoroutineDispatcher getDefault()
-
-
-
-