Skip to content

Instantly share code, notes, and snippets.

@mitchtabian
Created March 28, 2019 17:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mitchtabian/53254713a49bc966d3debf2a762c7dc2 to your computer and use it in GitHub Desktop.
Save mitchtabian/53254713a49bc966d3debf2a762c7dc2 to your computer and use it in GitHub Desktop.
Flowable.range(0, 1000000)
.onBackpressureBuffer()
.observeOn(Schedulers.computation())
.subscribe(new FlowableSubscriber<Integer>() {
@Override
public void onSubscribe(Subscription s) {
}
@Override
public void onNext(Integer integer) {
Log.d(TAG, "onNext: " + integer);
}
@Override
public void onError(Throwable t) {
Log.e(TAG, "onError: ", t);
}
@Override
public void onComplete() {
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment