Created
December 10, 2018 16:21
-
-
Save ShkurtiA/05db6ff5ffcb19faca9a6d3cd5fd1a99 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
Observable.just(1) // 1 will be emited in the IO thread pool | |
.subscribeOn(Schedulers.io()) | |
.flatMap(...) // will be in the IO thread pool | |
.observeOn(Schedulers.computation()) | |
.flatMap(...) // will be executed in the computation thread pool | |
.observeOn(AndroidSchedulers.mainThread()) | |
.subscribe(); // will be executed in the Android main thread (if you're running your code on Android) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
thread: ReactiveX/RxJava#2925