Skip to content
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

Merged
merged 1 commit into from
Mar 4, 2015

Conversation

stevenzwu
Copy link

No description provided.

* @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) {
Copy link
Member

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

Copy link
Author

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.

* @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) {
Copy link
Member

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.

Copy link
Author

Choose a reason for hiding this comment

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

will update. thanks

@stevenzwu
Copy link
Author

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

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.

@benjchristensen
Copy link
Member

I will manually add Experimental to it after merging.

benjchristensen added a commit that referenced this pull request Mar 4, 2015
issue-2764: add new operator onBackpressureDrop(Action1 onDrop)
@benjchristensen benjchristensen merged commit 4dd7040 into ReactiveX:1.x Mar 4, 2015
@benjchristensen
Copy link
Member

Thanks @stevenzwu

@stevenzwu
Copy link
Author

thanks. looks like I missed a lot of details :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants