Skip to content

2.x: Promote anonymous Observables to top-level types.#4291

Merged
akarnokd merged 1 commit into
ReactiveX:2.xfrom
JakeWharton:jw/top-level-types
Aug 8, 2016
Merged

2.x: Promote anonymous Observables to top-level types.#4291
akarnokd merged 1 commit into
ReactiveX:2.xfrom
JakeWharton:jw/top-level-types

Conversation

@JakeWharton
Copy link
Copy Markdown
Contributor

No description provided.

@JakeWharton JakeWharton changed the title Promote anonymous Observables to top-level types. 2.x: Promote anonymous Observables to top-level types. Aug 6, 2016
@codecov-io
Copy link
Copy Markdown

codecov-io commented Aug 6, 2016

Current coverage is 69.40% (diff: 52.94%)

Merging #4291 into 2.x will decrease coverage by 0.09%

@@                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   

Powered by Codecov. Last update 9315ec4...2453679


@Override
public void onSubscribe(Subscription inner) {
o.onSubscribe(Disposables.from(inner));
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can set it on a plain field, no need for atomics:

     this.inner = inner;
     o.onSubscribe(this);
     inner.request(Long.MAX_VALUE);

@JakeWharton
Copy link
Copy Markdown
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).

@akarnokd
Copy link
Copy Markdown
Member

akarnokd commented Aug 7, 2016

This needs rebasing.

@JakeWharton JakeWharton closed this Aug 7, 2016
@JakeWharton JakeWharton reopened this Aug 7, 2016
@akarnokd
Copy link
Copy Markdown
Member

akarnokd commented Aug 8, 2016

👍

@akarnokd akarnokd merged commit 5273cf0 into ReactiveX:2.x Aug 8, 2016
@JakeWharton JakeWharton deleted the jw/top-level-types branch August 20, 2016 23:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants