Sobes.tech
Junior — Senior

Determining the execution flow when using observeOn in RxJava

livecode

Task condition

It is necessary to determine in which thread the create operator and the subscription handler will be executed when the code is run from the main (UI) thread.

Observable.create<Int> { }
    .observeOn(Schedulers.computation())
    .subscribe { }