I am trying to find the main thread for subscribeOn in Rx3
Single.just(getHeavyData())
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<Data>() {
@Override
public void accept(Data d) throws Throwable {
setAdapters(d);
}
});
AndroidSchedulers.mainThread() - is not compatible with the brand new RX3
Gradle import: implementation "io.reactivex.rxjava3:rxjava:3.0.0-RC3"
How can we find the main thread in order to do changes to the UI?