Skip to content

Add optional bound to onBackpressureBuffer #1899

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

Closed
wants to merge 1 commit into from
Closed

Add optional bound to onBackpressureBuffer #1899

wants to merge 1 commit into from

Conversation

srvaroa
Copy link
Contributor

@srvaroa srvaroa commented Nov 22, 2014

The operator takes an optional capacity for the buffer and a callback to
be triggered when the buffer fills up.

The operator takes an optional capacity for the buffer and a callback to
be triggered when the buffer fills up.
@benjchristensen
Copy link
Member

Awesome, I've been wanting this overload. I'm a little swamped right now but will review this and move forward or provide feedback.

* @return the source Observable modified to buffer items up to the given capacity.
* @see <a href="https://github.com/ReactiveX/RxJava/wiki/Backpressure">RxJava wiki: Backpressure</a>
*/
public final Observable<T> onBackpressureBuffer(long capacity, Func0<Void> onOverflow) {
Copy link
Member

Choose a reason for hiding this comment

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

I suggest using an Action0 here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Makes sense. I'll add this as soon as I get some time to fix the broken tests.

@benjchristensen benjchristensen added this to the 1.1 milestone Nov 29, 2014
benjchristensen added a commit to benjchristensen/RxJava that referenced this pull request Dec 2, 2014
@benjchristensen
Copy link
Member

@srvaroa Can you please take a look at #1916 and the comments/questions I made there?

benjchristensen added a commit to benjchristensen/RxJava that referenced this pull request Dec 5, 2014
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