Nuances of observeOn()
observeOn()comes with nuances to be aware of, especially when it comes to performance implications due to lack of backpressure, which we will cover in Chapter 8, Flowables and Backpressure.
Say, you have an Observable chain with two sets of operations, Operation A and Operation B. Let's not worry what operators each one is using. If you do not have any observeOn()between them, the operation will pass emissions strictly one at a time from the source to Operation A, then Operation B, and finally to the Observer. Even with a subscribeOn(), the source will not pass the next emission down the chain until the current one is passed all the way to the Observer.
This changes when you introduce an observeOn() and say we put ...
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