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 {
|
||||
Observable.range(1, 1_000_000)
|
||||
.observeOn(Schedulers.computation())
|
||||
.subscribe(v -> ComputeFunction.compute(v), Throwable::printStackTrace);
|
||||
.subscribe(ComputeFunction::compute);
|
||||
|
||||
Thread.sleep(10_000);
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue