Activity.runOnUiThread()
has this:
if (Thread.currentThread() != mUiThread) {
mHandler.post(action);
} else {
action.run();
}
It means, it runs action immediately if I am in UI thread and posts action to handler if I am not. I am looking for RxJava Scheduler like this functionality. Does it exists?