Thank you for your article, unfortunately there is something I didn’t understand about the usage of…
Eido Askayo

Hey Edio,
the issue you are having is quite frequent one. 
Let’s only focus on the first line:


Because just as a parameter gets value and not function, we can rewrite the method like this:

boolean result = this.method();

Not we can see that the this.method is executed before it has anything to do with Rx. This means that it will be executed on whatever thread the parent method is executed.

To execute the method in a thread specified by Rx, we need to use fromCallable:

Observable.fromCallable(() -> method())

or with method reference:


This way method will be run on the thread you specify in onSubscribe.

Hope you get a clearer picture now.