2.x: add doFinally to the rest of the reactive base classes#4832
Merged
akarnokd merged 1 commit intoReactiveX:2.xfrom Nov 10, 2016
Merged
2.x: add doFinally to the rest of the reactive base classes#4832akarnokd merged 1 commit intoReactiveX:2.xfrom
akarnokd merged 1 commit intoReactiveX:2.xfrom
Conversation
Current coverage is 95.66% (diff: 98.67%)@@ 2.x #4832 diff @@
==========================================
Files 572 576 +4
Lines 36897 37048 +151
Methods 0 0
Messages 0 0
Branches 5578 5591 +13
==========================================
+ Hits 35267 35442 +175
+ Misses 677 663 -14
+ Partials 953 943 -10
|
JakeWharton
approved these changes
Nov 10, 2016
| } | ||
|
|
||
| void runFinally() { | ||
| if (compareAndSet(0, 1)) { |
Contributor
There was a problem hiding this comment.
Is there reasoning behind why int over boolean was used?
Member
Author
There was a problem hiding this comment.
So the pattern stays the same. Internally, AtomicBoolean does the same thing.
Contributor
There was a problem hiding this comment.
The half serialization pattern?
Member
Author
There was a problem hiding this comment.
This is an "enter once" pattern.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds the
doFinallyoperator to the rest of the base reactive classes.