-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Add an option to do zero byte reads on StreamPipeReader #49117
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
Conversation
Note regarding the This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, to please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change. |
src/libraries/System.IO.Pipelines/src/System/IO/Pipelines/StreamPipeReaderOptions.cs
Outdated
Show resolved
Hide resolved
- Added WaitForData to StreamPipeReader options that allows not allocating a buffer by doing a zero byte read on the underlying Stream before the internal buffer is allocated.
4b16f10
to
65959ec
Compare
This is ready for review. |
[ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] | ||
[InlineData(false)] | ||
[InlineData(true)] | ||
public async Task CanReadMultipleTimes(bool useZeroByteReads) |
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.
There should be another test with a mocked stream so we can check that it actually issues zero byte reads
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.
😢
src/libraries/System.IO.Pipelines/src/System/IO/Pipelines/StreamPipeReaderOptions.cs
Show resolved
Hide resolved
Something broken with Codedom? |
Not sure about codedom, but I've been seeing this error on a variety of PRs (including this one) over the last day or so: |
@ericstj fixed that issue yesterday after new packages were published to nuget.org. |
This failure was only 3 hrs ago. Was that somehow based on something stale? |
The last push was 22 hours ago, if you re-run from the AzDo UI I don't think you get a fresh rebase on main, so you're still running against 22 hour old bits. If you use |
/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. |
/azp run runtime |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run runtime (Libraries Build windows allConfigurations x64 Debug) |
No pipelines are associated with this pull request. |
/azp run runtime windows allConfigurations x64 Debug |
No pipelines are associated with this pull request. |
Fixes #37539
TODO: Finish API review