Skip to content

Commit e615d17

Browse files
AArnottBillWagner
andcommitted
Document caution regarding AdvanceTo's side effect (#3659)
* Document caution regarding AdvanceTo's side effect 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. * Use xref's Co-Authored-By: Bill Wagner <[email protected]>
1 parent e66b5cb commit e615d17

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

xml/System.IO.Pipelines/PipeReader.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
5454
## Remarks
5555
56-
The memory for the consumed data will be released and no longer available. The examined data communicates to the pipeline when it should signal more data is available.
56+
The memory for the consumed data will be released and no longer available. The <xref:System.IO.Pipelines.ReadResult.Buffer%2A> previously returned from <xref:System.IO.Pipelines.PipeReader.ReadAsync(System.Threading.CancellationToken)> must not be accessed after this call. The examined data communicates to the pipeline when it should signal more data is available.
5757
5858
]]></format>
5959
</remarks>

0 commit comments

Comments
 (0)