-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Additional Validation for PauseThresholdWriter and ResumeThresholdWriter #77359
Conversation
src/libraries/System.IO.Pipelines/src/System/IO/Pipelines/Pipe.cs
Outdated
Show resolved
Hide resolved
I've also submitted a PR so the API docs include info about the |
src/libraries/System.IO.Pipelines/src/System/IO/Pipelines/Pipe.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.IO.Pipelines/src/System/IO/Pipelines/Pipe.cs
Outdated
Show resolved
Hide resolved
|
||
if (pauseWriterThreshold < 0) | ||
{ | ||
ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.pauseWriterThreshold); | ||
} |
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.
Not sure why this block needs to move unless we're concerned about DefaultPauseWriterThreshold
being less than 0. Where it was before would still throw an exception if pauseWriterThreshold
was < -1
(due to the -1
check before it).
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.
What I think you want is the else if
below these lines to just be if
instead.
/azp run |
You have several pipelines (over 10) configured to build pull requests in this repository. Specify which pipelines you would like to run by using /azp run [pipelines] command. You can specify multiple pipelines using a comma separated list. |
The assert is firing.
|
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.
It looks like my comment from earlier was completely wrong. I must have gotten greater than and less than confused or something. I think @Turnerj is right about the else if
.
Fix #75166
Add in additional checks to ensure certain edge cases identified in the issue are handled appropriately to prevent programs from hanging indefinitely.