BEAL-572 use same chedulers to be consistent

This commit is contained in:
Tomasz Lelek 2017-02-04 17:00:22 +01:00
parent c8d818c2f5
commit 3bda12d20c
2 changed files with 2 additions and 2 deletions

View File

@ -9,7 +9,7 @@ public class ColdObservableBackPressure {
public static void main(String[] args) throws InterruptedException {
Observable.range(1, 1_000_000)
.observeOn(Schedulers.computation())
.subscribe(v -> ComputeFunction.compute(v), Throwable::printStackTrace);
.subscribe(ComputeFunction::compute);
Thread.sleep(10_000);

View File

@ -18,7 +18,7 @@ public class HotObservableOnBackPressure {
Observable.range(1, 1_000_000)
.onBackpressureDrop()
.observeOn(Schedulers.io())
.observeOn(Schedulers.computation())
.doOnNext(ComputeFunction::compute)
.subscribe(v -> {
}, Throwable::printStackTrace);