Skip to content

onBackpressureBuffer is not chainable with onBackpressureDrop #2768

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
stevenzwu opened this issue Feb 23, 2015 · 4 comments
Closed

onBackpressureBuffer is not chainable with onBackpressureDrop #2768

stevenzwu opened this issue Feb 23, 2015 · 4 comments
Milestone

Comments

@stevenzwu
Copy link

because it always requests Long.MAX_VALUE

@benjchristensen
Copy link
Member

The reason is that onBackpressureBuffer and onBackpressureDrop both exist to handle sources that don't respect backpressure, hence request(Long.MAX_VALUE) since that is not relevant on a source that doesn't obey backpressure.

Chaining them though assumes they compose backpressure request(n) which they don't.

So the question is whether we make them compose request(n) backpressure despite normally not being needed so they can compose, or should we have an onBackpressure(Strategy s) or onBackpressureBufferThenDrop style operator?

@stevenzwu
Copy link
Author

Just from usability point of view, composeable chaining is better than onBackpressureBufferThenDrop.
.onBackpressureDrop(onDrop).onBackpressureBuffer(capacity)

but looks like it's very difficult to chain with current assumption/implementation. btw these two, I like the first one, because it is more extensible: (1) onBackpressure(Strategy s) (2)onBackpressureBufferThenDrop

@benjchristensen benjchristensen added this to the 1.0.x milestone Mar 5, 2015
@akarnokd
Copy link
Member

See #3487.

@akarnokd
Copy link
Member

akarnokd commented Apr 2, 2016

Fix released via 1.1.2.

I'm closing this issue due to inactivity. If you have further input on the issue, don't hesitate to reopen this issue or post a new one.

@akarnokd akarnokd closed this as completed Apr 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants