Skip to content

Instantly share code, notes, and snippets.

@vvsevolodovich
Created April 17, 2018 19:32
Show Gist options
  • Select an option

  • Save vvsevolodovich/5b21da68fa440e1b700eb8ffdc9c9af2 to your computer and use it in GitHub Desktop.

Select an option

Save vvsevolodovich/5b21da68fa440e1b700eb8ffdc9c9af2 to your computer and use it in GitHub Desktop.
ObserveOnSingleObserver
ObserveOnSingleObserver(SingleObserver<? super T> actual, Scheduler scheduler) {
this.actual = actual;
this.scheduler = scheduler;
}
@Override
public void onSuccess(T value) {
this.value = value;
Disposable d = scheduler.scheduleDirect(this);
DisposableHelper.replace(this, d);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment