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: cancel upstream first, dispose worker last #5075

Merged
merged 2 commits into from
Feb 6, 2017

Conversation

akarnokd
Copy link
Member

@akarnokd akarnokd commented Feb 6, 2017

This PR makes sure the Scheduler.Worker is disposed only after

  • disposing/cancelling the upstream,
  • emitting terminal events.

This may help with situations when the worker-dispose interrupts a thread that is blocked and the InterruptedException handler checks for the stream to be disposed so the exception can be safely ignored (and thus not end up in the RxJavaPlugins.onError handler to crash the app).

Related: #4863

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

codecov bot commented Feb 6, 2017

Codecov Report

Merging #5075 into 2.x will increase coverage by -0.11%.

@@             Coverage Diff              @@
##                2.x    #5075      +/-   ##
============================================
- Coverage     95.65%   95.55%   -0.11%     
+ Complexity     5544     5542       -2     
============================================
  Files           612      612              
  Lines         39575    39561      -14     
  Branches       5554     5553       -1     
============================================
- Hits          37857    37803      -54     
- Misses          746      771      +25     
- Partials        972      987      +15
Impacted Files Coverage Δ Complexity Δ
...ternal/operators/flowable/FlowableBufferTimed.java 91% <100%> (+0.35%) 5 <ø> (ø)
...operators/flowable/FlowableThrottleFirstTimed.java 96.49% <100%> (-0.12%) 2 <ø> (ø)
...al/operators/observable/ObservableBufferTimed.java 91.72% <100%> (ø) 5 <ø> (ø)
...rnal/operators/flowable/FlowableDebounceTimed.java 93.82% <100%> (-0.08%) 2 <ø> (ø)
.../operators/observable/ObservableDebounceTimed.java 94.28% <100%> (-0.16%) 2 <ø> (ø)
...vex/internal/operators/flowable/FlowableDelay.java 100% <100%> (ø) 3 <ø> (ø)
...internal/operators/observable/ObservableDelay.java 100% <100%> (ø) 3 <ø> (ø)
...ernal/operators/flowable/FlowableTimeoutTimed.java 91.66% <100%> (-0.27%) 4 <ø> (ø)
...l/operators/observable/ObservableTimeoutTimed.java 93.1% <100%> (-0.23%) 4 <ø> (ø)
...ators/observable/ObservableThrottleFirstTimed.java 95.23% <100%> (-0.22%) 2 <ø> (ø)
... and 50 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 14ea26b...d0ffd35. Read the comment docs.

@akarnokd akarnokd merged commit 6456655 into ReactiveX:2.x Feb 6, 2017
@akarnokd akarnokd deleted the WorkerDisposeLater branch February 6, 2017 19:25
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