Nuances of observeOn()
The observeOn() operator comes with nuances to be aware of, especially when it comes to performance implications due to a lack of backpressure, which we will cover in Chapter 8, Flowable and Backpressure.
Let's say you have a chain of Observable operators 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 to Operation B, and finally to the Observer. Even with 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 ...
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