Change StreamReader.ReadBufferAsync to return ValueTask<int> (dotnet/coreclr#24810)
authorStephen Toub <stoub@microsoft.com>
Wed, 29 May 2019 00:36:52 +0000 (20:36 -0400)
committerGitHub <noreply@github.com>
Wed, 29 May 2019 00:36:52 +0000 (20:36 -0400)
commitd979ff72e757ecb652080a7e5c9bd4dc7cec8475
treeaf103059accce8a73c3bda3a21111c11aef8486f
parentb2e4413a615d8af2ac2ffd8f8247186661a08216
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
src/libraries/System.Private.CoreLib/src/System/IO/StreamReader.cs