2.x: Promote anonymous Observables to top-level types.#4291
Merged
Conversation
Current coverage is 69.40% (diff: 52.94%)@@ 2.x #4291 diff @@
==========================================
Files 420 424 +4
Lines 30761 30778 +17
Methods 0 0
Messages 0 0
Branches 4937 4938 +1
==========================================
- Hits 21378 21362 -16
- Misses 7296 7331 +35
+ Partials 2087 2085 -2
|
|
|
||
| @Override | ||
| public void onSubscribe(Subscription inner) { | ||
| o.onSubscribe(Disposables.from(inner)); |
Member
There was a problem hiding this comment.
If you make the outer a proper class, it can implement Disposable and dispose() can call cancel() on the field inner.
|
|
||
| @Override | ||
| public void onSubscribe(Subscription inner) { | ||
| SubscriptionHelper.setOnce(this, inner); |
Member
There was a problem hiding this comment.
You can set it on a plain field, no need for atomics:
this.inner = inner;
o.onSubscribe(this);
inner.request(Long.MAX_VALUE);
Contributor
Author
|
I think this is ready. I have another one following it to normalize the implementations of never+empty for all types (they vary slightly currently). |
Member
|
This needs rebasing. |
Member
|
👍 |
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.
No description provided.