Skip to content

Document caution regarding AdvanceTo's side effect #3659

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

Merged
merged 2 commits into from
Dec 12, 2019

Conversation

AArnott
Copy link
Contributor

@AArnott AArnott commented Dec 11, 2019

After calling PipeReader.AdvanceTo, the ReadResult.Buffer property's backing data is recycled, leading to indeterministic changes to not only the content but its Length property. This isn't particular predictable as a consumer and the docs didn't make it clear either.

This updates the docs to match the updated xml doc comments from dotnet/runtime#691

After calling `PipeReader.AdvanceTo`, the `ReadResult.Buffer` property's backing data is recycled, leading to indeterministic changes to not only the content but its `Length` property. This isn't particular predictable as a consumer and the docs didn't make it clear either.
@dotnet-bot dotnet-bot added this to the December 2019 milestone Dec 11, 2019
@carlossanlop carlossanlop requested review from a team, carlossanlop and jozkee December 11, 2019 17:07
@carlossanlop carlossanlop added the doc-enhancement Improve the current content label Dec 11, 2019
@carlossanlop carlossanlop requested review from halter73, davidfowl, jkotalik and analogrelay and removed request for jozkee December 11, 2019 17:09
@BillWagner BillWagner requested review from BillWagner and removed request for a team December 12, 2019 14:19
Copy link
Member

@BillWagner BillWagner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding this @AArnott

I have one suggestion to replace the code fences with xref links. Then, it's ready to merge.

Co-Authored-By: Bill Wagner <[email protected]>
@BillWagner
Copy link
Member

Thanks for the update @AArnott

I'll :shipit: now.

@BillWagner BillWagner merged commit e615d17 into dotnet:master Dec 12, 2019
@AArnott AArnott deleted the patch-1 branch December 12, 2019 16:24
@AArnott
Copy link
Contributor Author

AArnott commented Dec 12, 2019

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc-enhancement Improve the current content
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants