Skip to content

Instantly share code, notes, and snippets.

@sajadshokri
Created November 10, 2017 14:25
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 sajadshokri/a87d772abfce0875d138542f545e1f4d to your computer and use it in GitHub Desktop.
Save sajadshokri/a87d772abfce0875d138542f545e1f4d to your computer and use it in GitHub Desktop.
public static <T> Observable<T> schedule(Observable<T> observable) {
return observable
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment