-
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
OnSubscribeFromIterable - add request overflow check #2559
Conversation
REQUESTED get's reduced as well in this OnSubscribe. I'll ponder this and report what effects will be. Might make another change. |
I think BackpressureUtils would be a better name and an AtomicLong overload would be great. |
Righto
|
oops fixing the javadoc |
Changes made as requested by @akarnokd. The bit I was pondering was what behaviour should be expected of an
|
@@ -23,6 +23,16 @@ | |||
/** | |||
* Request a certain maximum number of items from this Producer. This is a way of requesting backpressure. | |||
* To disable backpressure, pass {@code Long.MAX_VALUE} to this method. | |||
* * <p> |
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.
Here is an extra * in the javadoc.
d7b63ad
to
8496582
Compare
fixed javadoc typo, squashed commits |
Good job! Merging. |
OnSubscribeFromIterable - add request overflow check
A subscriber like so provokes a hang from
OnSubscribeFromIterable
due to overflow to negative of requested field:I've moved the
getAndAddRequest
method that does the overflow check to a newrx.internal.operators.Util
class that is also now used by the request overflow check inOperatorMerge
.Of course there are plenty more of these to be done. I propose to do them bit by bit.