提交 d979ff72 编写于 作者: S Stephen Toub 提交者: GitHub

Change StreamReader.ReadBufferAsync to return ValueTask<int> (dotnet/coreclr#24810)

It's a private helper that's always directly awaited.  No need to allocate a task each time it's called and data is synchronously available.

Commit migrated from https://github.com/dotnet/coreclr/commit/13405da4ba21095f7673a10eaabfef990117478d
上级 b2e4413a
......@@ -1238,7 +1238,7 @@ public override ValueTask<int> ReadBlockAsync(Memory<char> buffer, CancellationT
return new ValueTask<int>(t);
}
private async Task<int> ReadBufferAsync()
private async ValueTask<int> ReadBufferAsync()
{
_charLen = 0;
_charPos = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册