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: more eager cancellation in flatMapX #5422

Merged
merged 2 commits into from
Jun 17, 2017

Conversation

akarnokd
Copy link
Member

The FlatMapX tests kept failing because there was a race between the cancellation and the disposing of their inner set: the cancel may have interrupted the test wait and ended up in the inner subscribe before set.isDisposed() would become true in the dispose() call of the operator that run on the main thread. The change adds/uses a boolean field that gets set first and is checked before the inner are subscribed.

@akarnokd akarnokd added this to the 2.2 milestone Jun 16, 2017
@akarnokd akarnokd merged commit 73a85c1 into ReactiveX:2.x Jun 17, 2017
@akarnokd akarnokd deleted the FlatMapXMoreEagerCancel branch June 17, 2017 06:23
@codecov
Copy link

codecov bot commented Jun 17, 2017

Codecov Report

Merging #5422 into 2.x will decrease coverage by 0.14%.
The diff coverage is 33.33%.

Impacted file tree graph

@@             Coverage Diff              @@
##                2.x    #5422      +/-   ##
============================================
- Coverage     96.12%   95.98%   -0.15%     
+ Complexity     5785     5781       -4     
============================================
  Files           630      630              
  Lines         41232    41236       +4     
  Branches       5728     5728              
============================================
- Hits          39635    39581      -54     
- Misses          627      650      +23     
- Partials        970     1005      +35
Impacted Files Coverage Δ Complexity Δ
...ernal/operators/flowable/FlowableFlatMapMaybe.java 93.71% <0%> (-1.45%) 2 <0> (ø)
.../operators/observable/ObservableFlatMapSingle.java 92.53% <0%> (-3.74%) 2 <0> (ø)
...l/operators/observable/ObservableFlatMapMaybe.java 94.11% <0%> (-2.62%) 2 <0> (ø)
...rnal/operators/flowable/FlowableFlatMapSingle.java 95.65% <0%> (ø) 2 <0> (ø) ⬇️
...vable/ObservableFlatMapCompletableCompletable.java 95.83% <50%> (-1.35%) 3 <0> (ø)
...lowable/FlowableFlatMapCompletableCompletable.java 96.38% <50%> (-1.18%) 3 <0> (ø)
...ators/observable/ObservableFlatMapCompletable.java 95.94% <50%> (-1.32%) 2 <0> (ø)
...operators/flowable/FlowableFlatMapCompletable.java 94.11% <50%> (-1.13%) 2 <0> (ø)
...al/operators/observable/ObservableSampleTimed.java 88.33% <0%> (-10%) 3% <0%> (ø)
...ternal/operators/flowable/FlowableSubscribeOn.java 91.52% <0%> (-6.78%) 2% <0%> (ø)
... and 39 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 f64fdd9...cc8a823. 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.

2 participants