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 timed exact buffer calling cancel unnecessarily #5761

Merged
merged 1 commit into from
Dec 15, 2017

Conversation

akarnokd
Copy link
Member

This PR removes the unnnecessary cancel/dispose call from the exact-boundary timed buffer() operators in Observable and Flowable when the upstream completes normally.

Originally appeared in a StackOverflow question.

@akarnokd akarnokd added this to the 2.2 milestone Dec 12, 2017
@codecov
Copy link

codecov bot commented Dec 12, 2017

Codecov Report

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

Impacted file tree graph

@@             Coverage Diff              @@
##                2.x    #5761      +/-   ##
============================================
- Coverage     96.24%   96.24%   -0.01%     
- Complexity     5838     5839       +1     
============================================
  Files           634      634              
  Lines         41653    41656       +3     
  Branches       5769     5772       +3     
============================================
+ Hits          40090    40091       +1     
+ Misses          624      621       -3     
- Partials        939      944       +5
Impacted Files Coverage Δ Complexity Δ
...al/operators/observable/ObservableBufferTimed.java 92.19% <100%> (ø) 5 <0> (ø) ⬇️
...ternal/operators/flowable/FlowableBufferTimed.java 90.1% <100%> (-0.74%) 5 <0> (ø)
...a/io/reactivex/internal/util/QueueDrainHelper.java 60.41% <33.33%> (-1.29%) 34 <0> (+1)
...ternal/operators/observable/ObservablePublish.java 92.1% <0%> (-4.39%) 10% <0%> (-1%)
...erators/completable/CompletableConcatIterable.java 95.91% <0%> (-4.09%) 2% <0%> (ø)
...l/operators/observable/ObservableFlatMapMaybe.java 84.96% <0%> (-3.93%) 2% <0%> (ø)
.../internal/operators/flowable/FlowableInterval.java 94.44% <0%> (-2.78%) 3% <0%> (ø)
.../operators/observable/ObservableFlatMapSingle.java 91.79% <0%> (-2.24%) 2% <0%> (ø)
...nternal/operators/parallel/ParallelReduceFull.java 93.13% <0%> (-1.97%) 2% <0%> (ø)
...rnal/subscriptions/DeferredScalarSubscription.java 98.46% <0%> (-1.54%) 28% <0%> (-1%)
... and 22 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 b338ffe...993f4dc. Read the comment docs.

Copy link
Collaborator

@vanniktech vanniktech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Huh this totally slipped on my side.

@akarnokd akarnokd merged commit 39e159f into ReactiveX:2.x Dec 15, 2017
@akarnokd akarnokd deleted the BufferTimedCancelFix branch December 15, 2017 08:26
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