Skip to content

Instantly share code, notes, and snippets.

@ZacSweers
Last active July 1, 2018 07:48
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 ZacSweers/af9268552e13d57c17e6a81b90e73442 to your computer and use it in GitHub Desktop.
Save ZacSweers/af9268552e13d57c17e6a81b90e73442 to your computer and use it in GitHub Desktop.
val asyncMainThreadScheduler = AndroidSchedulers.from(Looper.getMainLooper(), true)
RxAndroidPlugins.setInitMainThreadSchedulerHandler { asyncMainThreadScheduler }
// Or if the default scheduler is already initialiazed
RxAndroidPlugins.setMainThreadSchedulerHandler { asyncMainThreadScheduler }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment