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: Fix concatEager to dispose sources & clean up properly. #6405

Merged
merged 1 commit into from
Feb 12, 2019

Conversation

akarnokd
Copy link
Member

@akarnokd akarnokd commented Feb 12, 2019

This PR fixes the concatMapEager operator (which drives the static variants as well) to properly dispose and clean up the state of the operator upon cancelling/disposing the sequence.

  • Flowable.concatMapEager did not cancel the current active inner consumer, only the ones coming after
  • Observable.concatMapEager did not dispose the main source of the inner observables.

Both variants have received the same two unit tests to verify their behavior.

Fixes: #6404

@codecov
Copy link

codecov bot commented Feb 12, 2019

Codecov Report

Merging #6405 into 2.x will decrease coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##                2.x    #6405      +/-   ##
============================================
- Coverage     98.24%   98.22%   -0.02%     
  Complexity     6294     6294              
============================================
  Files           675      675              
  Lines         45156    45166      +10     
  Branches       6239     6242       +3     
============================================
+ Hits          44365    44366       +1     
- Misses          247      253       +6     
- Partials        544      547       +3
Impacted Files Coverage Δ Complexity Δ
...nal/operators/flowable/FlowableConcatMapEager.java 98.85% <100%> (+0.02%) 2 <0> (ø) ⬇️
...operators/observable/ObservableConcatMapEager.java 99.47% <100%> (+0.01%) 2 <0> (ø) ⬇️
.../io/reactivex/internal/schedulers/IoScheduler.java 89.36% <0%> (-4.26%) 9% <0%> (ø)
...tivex/internal/schedulers/TrampolineScheduler.java 96.1% <0%> (-2.6%) 6% <0%> (ø)
...activex/internal/observers/QueueDrainObserver.java 97.43% <0%> (-2.57%) 21% <0%> (-1%)
...nternal/operators/parallel/ParallelSortedJoin.java 92.7% <0%> (-2.19%) 2% <0%> (ø)
...x/internal/operators/flowable/FlowablePublish.java 96.2% <0%> (-2.11%) 11% <0%> (ø)
...nternal/operators/observable/ObservableWindow.java 98% <0%> (-2%) 3% <0%> (ø)
...tivex/internal/operators/single/SingleTimeout.java 98.33% <0%> (-1.67%) 2% <0%> (ø)
...ex/internal/operators/flowable/FlowableCreate.java 96.12% <0%> (-1.62%) 6% <0%> (ø)
... and 26 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 6e266af...d2c303f. Read the comment docs.

@akarnokd akarnokd merged commit 7fffa00 into ReactiveX:2.x Feb 12, 2019
@akarnokd akarnokd deleted the ConcatEagerXDispose branch February 12, 2019 22:24
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.

concatEager does not unsubscribe from sources
2 participants