-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
1.x: rework Single internals to reduce overhead and stack depth #4648
Conversation
Current coverage is 84.03% (diff: 64.75%)@@ 1.x #4648 diff @@
==========================================
Files 274 288 +14
Lines 17766 17991 +225
Methods 0 0
Messages 0 0
Branches 2727 2749 +22
==========================================
+ Hits 15009 15119 +110
- Misses 1889 1996 +107
- Partials 868 876 +8
|
|
||
@Override | ||
public void call(SingleSubscriber<? super T> t) { | ||
// TODO Auto-generated method stub |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delete
* Creates a Single with a Function to execute when it is subscribed to (executed). | ||
* <p> | ||
* <em>Note:</em> Use {@link #create(OnSubscribe)} to create a Single, instead of this constructor, | ||
* unless you specifically have a need for inheritance. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could also @Deprecate
this constructor.
* Creates a Single with a Function to execute when it is subscribed to (executed). | ||
* <p> | ||
* <em>Note:</em> Use {@link #create(OnSubscribe)} to create a Single, instead of this constructor, | ||
* unless you specifically have a need for inheritance. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated.
This PR makes the
Single.OnSubscribe
as the primary means to execute the subscribe action inSingle
and former couple of reusedObservable
operators are now recreated withSingle.OnSubscribe
.Because
Single
is now marked final, we can't remove the formerObservable.Operator
andObservable.OnSubscribe
entry points (but may be deprecated in a separate PR).