Skip to content

Instantly share code, notes, and snippets.

Created May 14, 2017
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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment