-
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
request(0) is supposed to work? #1956
Comments
|
I concur yet some places, a request(0) may trigger a loop and decrement the request counter below zero on the exit edge or do some other sideeffects. (Search for
|
Then it looks like we should better document that Do we want to ignore a negative number as well (like 0), or throw an IllegalArgumentException? As a data point the Reactive Streams spec throws an IAE. |
Usually a negative number is not intentional, usually means a bug in some place. So I like IAE rather than ignoring them. |
I'm okay with IAE. |
I'm using request(0) some places/tests to suppress the default behavior of requesting unlimited amount. |
The docs about
request
doesn't say anything requirement aboutn
I assume
n
must be greater than 0. But I also notice I may write something like this occasionally:So
request(0)
is fine? If not, I think it's better to document it.The text was updated successfully, but these errors were encountered: