June 2018
Intermediate to advanced
280 pages
7h 46m
English
Observables are agnostic in terms of thread scheduling–in a multithreading environment, this is the job of a scheduler. Some of the operators presented variants that can take a scheduler as a parameter. There are specific calls that allow observing the flow either from downstream (the point where the operator is used, this is the case of observeOn) or irrespective of call position (the call position does not matter, as this is the case of the subscribeOn method). In the following example, we will print the current thread from upstream and downstream. Notice that in the case of subscribeOn, the thread is always the same:

Notice the ...
Read now
Unlock full access