I'd like to know what happens when we have multiple subscribeOn() methods in a RxJava chain. For instance if I had a chain that was something like this,
Single.fromCallable { repository.apiCall1() }
.subscribeOn(Schedulers.io())
.flatMap { result -> Single.fromCallable { repository.apiCall2() } }
.subscribeOn(Schedulers.io())
.map { // do something }
.observeOn(Schedulers.ui())
would this mean that the thread the API calls run on is not the same? And what would be the impact / effect of removing the first subscribeOn(Schedulers.io()) call in this chain above?
Appreciate any insights on this