Skip to content

Instantly share code, notes, and snippets.

@vvsevolodovich
Last active April 17, 2018 15:35
Show Gist options
  • Save vvsevolodovich/fd0cca80cf5bb5a4bcbae50589a0bdef to your computer and use it in GitHub Desktop.
Save vvsevolodovich/fd0cca80cf5bb5a4bcbae50589a0bdef to your computer and use it in GitHub Desktop.
SingleSubscribeOn
@Override
protected void subscribeActual(final SingleObserver<? super T> s) {
final SubscribeOnObserver<T> parent = new SubscribeOnObserver<T>(s, source);
s.onSubscribe(parent);
Disposable f = scheduler.scheduleDirect(parent);
parent.task.replace(f);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment