You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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]>
Copy file name to clipboardExpand all lines: xml/System.IO.Pipelines/PipeReader.xml
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -53,7 +53,7 @@
53
53
54
54
## Remarks
55
55
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.
0 commit comments