Created
January 18, 2020 22:05
-
-
Save CostaFot/195dde8c760f3d1c15afe29e34603d68 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface DispatcherProvider { | |
val io: CoroutineDispatcher | |
val ui: CoroutineDispatcher | |
val default: CoroutineDispatcher | |
val unconfined: CoroutineDispatcher | |
} | |
class DefaultDispatcherProvider( | |
override val ui: CoroutineDispatcher = Dispatchers.Main, | |
override val default: CoroutineDispatcher = Dispatchers.Default, | |
override val io: CoroutineDispatcher = Dispatchers.IO, | |
override val unconfined: CoroutineDispatcher = Dispatchers.Unconfined | |
) : DispatcherProvider |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment