Skip to content

Instantly share code, notes, and snippets.

@BartoszJarocki
Created May 14, 2017
Embed
What would you like to do?
public class ThreadConfiguration {
private Scheduler subscribeOnScheduler;
private Scheduler observeOnScheduler;
public ThreadConfiguration(final Scheduler subscribeOnScheduler,
final Scheduler observeOnScheduler) {
this.subscribeOnScheduler = subscribeOnScheduler;
this.observeOnScheduler = observeOnScheduler;
}
public <T> Observable.Transformer<T, T> applySchedulers() {
return observable -> observable.subscribeOn(subscribeOnScheduler)
.observeOn(observeOnScheduler);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment