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
Fix StackOverflowException when reading large buffers.
This was similar to #239 but occurred in InsertLargeBlobAsync when reading over a slow connection. The 'ContinueWith' code chained too many continuations together recursively. The compiler-generated 'await' state machine avoids this problem.
/// Returns <c>true</c> if all the required data has been read, then sets <paramref name="result"/> to a <see cref="ValueTask{ArraySegment{byte}}"/> representing that data.
57
-
/// Otherwise, returns <c>false</c> and updates <paramref name="buffer"/> to where more data should be placed when it's read.
58
-
/// </summary>
59
-
/// <param name="readBytesCount">The number of bytes that have just been read into <paramref name="buffer"/>.</param>
60
-
/// <param name="buffer">The <see cref="ArraySegment{byte}"/> that contains all the data read so far, and that will receive more data read in the future. It is assumed that data is stored
61
-
/// at the beginning of the array owned by <paramref name="buffer"/> and that <code>Offset</code> indicates where to place future data.</param>
62
-
/// <param name="totalBytesToRead">The total number of bytes that need to be read.</param>
63
-
/// <param name="result">On success, a <see cref="ValueTask{ArraySegment{byte}}"/> representing all the data that was read.</param>
64
-
/// <returns><c>true</c> if all data has been read; otherwise, <c>false</c>.</returns>
0 commit comments