Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.x: make parallel() a fusion-async-boundary #5677

Merged
merged 1 commit into from Oct 17, 2017

Conversation

akarnokd
Copy link
Member

@akarnokd akarnokd commented Oct 17, 2017

The parallel() supports front-fusion but since the operator is almost always followed by the separate runOn operator, the parallel version of the observeOn operator, such front-fusion should be considered a BOUNDARY-type fusion just like with observeOn.

A requestFusion with BOUNDARY tells the upstream operator(s) that when fused, their actions would be executed behind an async boundary and possibly on an unwanted thread. Operators, such as map and doOnNext, who are generally expected to be thread-confined, can then refuse to fuse, restoring the traditional queue hopping behavior (source -> queue -> op -> queue -> op -> queue -> consumer).

Reported in #5676.

/cc @smaldini & @simonbasle

@codecov
Copy link

codecov bot commented Oct 17, 2017

Codecov Report

Merging #5677 into 2.x will decrease coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##                2.x    #5677      +/-   ##
============================================
- Coverage     96.22%   96.21%   -0.01%     
+ Complexity     5813     5812       -1     
============================================
  Files           633      633              
  Lines         41552    41552              
  Branches       5751     5751              
============================================
- Hits          39983    39980       -3     
- Misses          620      629       +9     
+ Partials        949      943       -6
Impacted Files Coverage Δ Complexity Δ
...rnal/operators/parallel/ParallelFromPublisher.java 94.31% <100%> (-1.43%) 4 <0> (ø)
...in/java/io/reactivex/subjects/BehaviorSubject.java 86.97% <0%> (-5.73%) 57% <0%> (ø)
...ava/io/reactivex/processors/BehaviorProcessor.java 89.38% <0%> (-4.87%) 61% <0%> (ø)
...ernal/operators/flowable/FlowableFlatMapMaybe.java 92.27% <0%> (-3.39%) 2% <0%> (ø)
.../internal/operators/flowable/FlowableInterval.java 94.44% <0%> (-2.78%) 3% <0%> (ø)
...java/io/reactivex/subjects/CompletableSubject.java 97.4% <0%> (-2.6%) 36% <0%> (-1%)
...activex/internal/observers/QueueDrainObserver.java 61.53% <0%> (-2.57%) 12% <0%> (-1%)
.../internal/disposables/ListCompositeDisposable.java 98% <0%> (-2%) 34% <0%> (-1%)
...nternal/operators/observable/ObservableWindow.java 98% <0%> (-2%) 3% <0%> (ø)
...java/io/reactivex/processors/PublishProcessor.java 98.27% <0%> (-1.73%) 45% <0%> (-1%)
... and 27 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1ad6647...45a04ca. Read the comment docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants