Basically `subscribeOn` affect all the operation a...
# rx
e
Basically
subscribeOn
affect all the operation above it, and
observeOn
affect operations below it e.g.
Copy code
a.map { b }
.subscribeOn(<http://Schedulers.io|Schedulers.io>())
.map{ c }
.observeOn(Schedulers.computation())
.map { d }
subscribeOn
will change the execution thread of
a
,
.map{ b }
to
io()
.map { c }
will also be on the
IO
thread as nothing changes the thread.
.map { d }
will be executed on the
computation
thread as affected by
observeOn
Hope it makes you clear
👍 2