Summary
This was probably our most intense chapter yet, but it provides a turning point in your proficiency as an RxJava developer as well as a master of concurrency! We covered the different schedulers available in RxJava, as well as ones available in other libraries such as RxJavaFX and RxAndroid. The subscribeOn() operator is used to suggest to the upstream in an Observable chain which Scheduler to push emissions on. observeOn() switches emissions to a different Scheduler at that point in the Observable chain and uses that Scheduler downstream. You can use these two operators in conjunction with flatMap() to create powerful parallelization patterns so that you can fully utilize your multi-CPU power. We finally covered unsubscribeOn()
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access