Skip to content

Commit 3bda12d

Browse files
author
Tomasz Lelek
committed
BEAL-572 use same chedulers to be consistent
1 parent c8d818c commit 3bda12d

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎rxjava/src/main/java/com/baelding/rxjava/ColdObservableBackpressure.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ public class ColdObservableBackPressure {
99
public static void main(String[] args) throws InterruptedException {
1010
Observable.range(1, 1_000_000)
1111
.observeOn(Schedulers.computation())
12-
.subscribe(v -> ComputeFunction.compute(v), Throwable::printStackTrace);
12+
.subscribe(ComputeFunction::compute);
1313

1414
Thread.sleep(10_000);
1515

‎rxjava/src/main/java/com/baelding/rxjava/HotObservableOnBackPressure.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public static void main(String[] args) throws InterruptedException {
1818

1919
Observable.range(1, 1_000_000)
2020
.onBackpressureDrop()
21-
.observeOn(Schedulers.io())
21+
.observeOn(Schedulers.computation())
2222
.doOnNext(ComputeFunction::compute)
2323
.subscribe(v -> {
2424
}, Throwable::printStackTrace);

0 commit comments

Comments
 (0)