Skip to content

Instantly share code, notes, and snippets.

@RBusarow
Created January 11, 2020 23:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RBusarow/07f33a9e1528671d4749169a8f15f3bd to your computer and use it in GitHub Desktop.
Save RBusarow/07f33a9e1528671d4749169a8f15f3bd to your computer and use it in GitHub Desktop.
more succinct version of the Dispatchers object from kotlinx.coroutines
object Dispatchers {
val Default: CoroutineDispatcher = createDefaultDispatcher()
val Main: MainCoroutineDispatcher get() = MainDispatcherLoader.dispatcher
val Unconfined: CoroutineDispatcher = kotlinx.coroutines.Unconfined
val IO: CoroutineDispatcher = DefaultScheduler.IO
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment