Additional Validation for PauseThresholdWriter and ResumeThresholdWriter#77359
Additional Validation for PauseThresholdWriter and ResumeThresholdWriter#77359halter73 merged 6 commits intodotnet:mainfrom cdbullard:thresholdwriter-validation
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.
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.
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.
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.