File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/perf/java/rx/operators Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -49,21 +49,21 @@ public int getSize() {
49
49
@ Benchmark
50
50
public void observeOnComputation (Input input ) throws InterruptedException {
51
51
LatchedObserver <Integer > o = input .newLatchedObserver ();
52
- input .observable .observeOn (Schedulers .computation ()).subscribe (o );
52
+ input .observable .subscribeOn ( Schedulers . computation ()). observeOn (Schedulers .computation ()).subscribe (o );
53
53
o .latch .await ();
54
54
}
55
55
56
56
@ Benchmark
57
57
public void observeOnNewThread (Input input ) throws InterruptedException {
58
58
LatchedObserver <Integer > o = input .newLatchedObserver ();
59
- input .observable .observeOn (Schedulers .newThread ()).subscribe (o );
59
+ input .observable .subscribeOn ( Schedulers . computation ()). observeOn (Schedulers .newThread ()).subscribe (o );
60
60
o .latch .await ();
61
61
}
62
62
63
63
@ Benchmark
64
64
public void observeOnImmediate (Input input ) throws InterruptedException {
65
65
LatchedObserver <Integer > o = input .newLatchedObserver ();
66
- input .observable .observeOn (Schedulers .immediate ()).subscribe (o );
66
+ input .observable .subscribeOn ( Schedulers . computation ()). observeOn (Schedulers .immediate ()).subscribe (o );
67
67
o .latch .await ();
68
68
}
69
69
You can’t perform that action at this time.
0 commit comments