BEAL-572 use same chedulers to be consistent
This commit is contained in:
parent
c8d818c2f5
commit
3bda12d20c
|
@ -9,7 +9,7 @@ public class ColdObservableBackPressure {
|
||||||
public static void main(String[] args) throws InterruptedException {
|
public static void main(String[] args) throws InterruptedException {
|
||||||
Observable.range(1, 1_000_000)
|
Observable.range(1, 1_000_000)
|
||||||
.observeOn(Schedulers.computation())
|
.observeOn(Schedulers.computation())
|
||||||
.subscribe(v -> ComputeFunction.compute(v), Throwable::printStackTrace);
|
.subscribe(ComputeFunction::compute);
|
||||||
|
|
||||||
Thread.sleep(10_000);
|
Thread.sleep(10_000);
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ public class HotObservableOnBackPressure {
|
||||||
|
|
||||||
Observable.range(1, 1_000_000)
|
Observable.range(1, 1_000_000)
|
||||||
.onBackpressureDrop()
|
.onBackpressureDrop()
|
||||||
.observeOn(Schedulers.io())
|
.observeOn(Schedulers.computation())
|
||||||
.doOnNext(ComputeFunction::compute)
|
.doOnNext(ComputeFunction::compute)
|
||||||
.subscribe(v -> {
|
.subscribe(v -> {
|
||||||
}, Throwable::printStackTrace);
|
}, Throwable::printStackTrace);
|
||||||
|
|
Loading…
Reference in New Issue