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 Observable.combineLatest to dispose eagerly #5114

Merged
merged 1 commit into from
Feb 18, 2017

Conversation

akarnokd
Copy link
Member

This PR fixes Observable.combineLatest to dispose the sources outside the serialization loop, just like Flowable.combineLatest does. This allows cancellation even if the serialization loop is busy/blocking inside an onNext emission.

In addition, a unit test was added to Flowable.combineLatest as well.

Reported in #5111.

@akarnokd akarnokd added this to the 2.0 backlog milestone Feb 18, 2017
@codecov
Copy link

codecov bot commented Feb 18, 2017

Codecov Report

Merging #5114 into 2.x will decrease coverage by -0.07%.
The diff coverage is 100%.

@@             Coverage Diff              @@
##                2.x    #5114      +/-   ##
============================================
- Coverage     95.15%   95.09%   -0.07%     
- Complexity     5561     5565       +4     
============================================
  Files           620      620              
  Lines         40011    40014       +3     
  Branches       5632     5632              
============================================
- Hits          38072    38050      -22     
- Misses          920      944      +24     
- Partials       1019     1020       +1
Impacted Files Coverage Δ Complexity Δ
.../operators/observable/ObservableCombineLatest.java 98.75% <100%> (+0.02%) 6 <ø> (ø)
.../operators/observable/ObservableFlatMapSingle.java 89.55% <ø> (-7.47%) 2% <ø> (ø)
...internal/disposables/ArrayCompositeDisposable.java 92.85% <ø> (-7.15%) 15% <ø> (-1%)
...in/java/io/reactivex/subjects/BehaviorSubject.java 83.93% <ø> (-5.7%) 55% <ø> (ø)
...rnal/subscribers/SinglePostCompleteSubscriber.java 94.87% <ø> (-5.13%) 14% <ø> (-1%)
...ava/io/reactivex/processors/BehaviorProcessor.java 87.38% <ø> (-4.21%) 56% <ø> (+1%)
...x/internal/operators/maybe/MaybeSwitchIfEmpty.java 97.22% <ø> (-2.78%) 2% <ø> (ø)
...rnal/operators/flowable/FlowableTakeLastTimed.java 96.29% <ø> (-2.78%) 2% <ø> (ø)
...l/operators/observable/ObservableFlatMapMaybe.java 92.15% <ø> (-2.62%) 2% <ø> (ø)
...activex/internal/schedulers/ExecutorScheduler.java 94.07% <ø> (-2.23%) 9% <ø> (ø)
... and 38 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 a00ea07...0050275. Read the comment docs.

@akarnokd akarnokd merged commit 06f801c into ReactiveX:2.x Feb 18, 2017
@akarnokd akarnokd deleted the ObsCombineLatestEagerCancel branch February 18, 2017 20:22
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.

3 participants