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

fix #1486 Prevent usingWhen terminal & cancel callbacks to both apply #1487

Merged
merged 2 commits into from
Jan 14, 2019

Conversation

simonbasle
Copy link
Member

This commit prevents asyncComplete/asyncError terminal callbacks to
apply in addition to asyncCancel, in case one signal is still received
after the other (eg. a cancellation is performed asynchronously,
resulting in the signal arriving AFTER the onError/onComplete signals).

This commit prevents asyncComplete/asyncError terminal callbacks to
apply in addition to asyncCancel, in case one signal is still received
after the other (eg. a cancellation is performed asynchronously,
resulting in the signal arriving AFTER the onError/onComplete signals).
@simonbasle simonbasle self-assigned this Jan 11, 2019
@simonbasle
Copy link
Member Author

cc @mp911de can you look at the added tests see if they correctly cover your case?

@codecov-io
Copy link

codecov-io commented Jan 11, 2019

Codecov Report

Merging #1487 into master will increase coverage by 0.03%.
The diff coverage is 96.29%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #1487      +/-   ##
============================================
+ Coverage     84.14%   84.17%   +0.03%     
  Complexity     3898     3898              
============================================
  Files           359      359              
  Lines         29831    29835       +4     
  Branches       5531     5534       +3     
============================================
+ Hits          25102    25115      +13     
+ Misses         3094     3091       -3     
+ Partials       1635     1629       -6
Impacted Files Coverage Δ Complexity Δ
...ain/java/reactor/core/publisher/FluxUsingWhen.java 96.48% <96.29%> (+0.07%) 8 <0> (ø) ⬇️
.../java/reactor/core/publisher/UnicastProcessor.java 87.15% <0%> (-1.12%) 68% <0%> (-1%)
.../java/reactor/core/publisher/BlockingIterable.java 78.12% <0%> (-1.05%) 7% <0%> (ø)
...java/reactor/core/publisher/FluxSwitchOnFirst.java 74.32% <0%> (-0.68%) 3% <0%> (ø)
...c/main/java/reactor/core/publisher/FluxCreate.java 86.88% <0%> (+0.24%) 8% <0%> (ø) ⬇️
...ain/java/reactor/core/publisher/FluxConcatMap.java 90.42% <0%> (+0.28%) 7% <0%> (ø) ⬇️
...c/main/java/reactor/core/publisher/FluxReplay.java 84.47% <0%> (+0.31%) 25% <0%> (ø) ⬇️
...eactor/core/publisher/ParallelMergeSequential.java 80.31% <0%> (+0.51%) 7% <0%> (ø) ⬇️
...ava/reactor/core/publisher/EventLoopProcessor.java 80.82% <0%> (+0.51%) 53% <0%> (+1%) ⬆️
...in/java/reactor/core/publisher/FluxWindowWhen.java 81.73% <0%> (+1.44%) 2% <0%> (ø) ⬇️
... and 2 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 a2929c9...9615bf3. Read the comment docs.

@bsideup
Copy link
Contributor

bsideup commented Jan 11, 2019

@simonbasle don't we need to do the same in MonoUsingWhen?

Co-Authored-By: simonbasle <sbasle@pivotal.io>
@simonbasle
Copy link
Member Author

@simonbasle don't we need to do the same in MonoUsingWhen?

nope, the MonoUsingWhen operator reuses the same Subscriber.

@simonbasle simonbasle merged commit 42db2f7 into master Jan 14, 2019
@simonbasle simonbasle deleted the 1486-usingWhenAtomicCleanup branch January 14, 2019 18:21
bsideup pushed a commit that referenced this pull request Jan 28, 2019
…#1487)

This commit prevents asyncComplete/asyncError terminal callbacks to
apply in addition to asyncCancel, in case one signal is still received
after the other (eg. a cancellation is performed asynchronously,
resulting in the signal arriving AFTER the onError/onComplete signals).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants