-
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
issue-2764: add new operator onBackpressureDrop(Action1 onDrop) #2776
Conversation
* @return the source Observable modified to drop {@code onNext} notifications on overflow | ||
* @see <a href="http://reactivex.io/documentation/operators/backpressure.html">ReactiveX operators documentation: backpressure operators</a> | ||
*/ | ||
public final Observable<T> onBackpressureDrop(Action1 onDrop) { |
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.
Action1 should be generic: Action1<? super T> onDrop
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.
will fix. forgot the generic for arg. did it for member var.
2a8e7da
to
b99492d
Compare
* @return the source Observable modified to drop {@code onNext} notifications on overflow | ||
* @see <a href="http://reactivex.io/documentation/operators/backpressure.html">ReactiveX operators documentation: backpressure operators</a> | ||
*/ | ||
public final Observable<T> onBackpressureDrop(Action1<T> onDrop) { |
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.
You need Action1<? super T>
here.
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.
will update. thanks
added super to generic type T |
* @return the source Observable modified to drop {@code onNext} notifications on overflow | ||
* @see <a href="http://reactivex.io/documentation/operators/backpressure.html">ReactiveX operators documentation: backpressure operators</a> | ||
*/ | ||
public final Observable<T> onBackpressureDrop(Action1<? super T> onDrop) { |
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.
Please add @Experimental
annotation to this method.
I will manually add Experimental to it after merging. |
issue-2764: add new operator onBackpressureDrop(Action1 onDrop)
Thanks @stevenzwu |
thanks. looks like I missed a lot of details :) |
No description provided.