diff options
author | Stephen Toub <stoub@microsoft.com> | 2019-05-28 20:36:52 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-28 20:36:52 -0400 |
commit | 13405da4ba21095f7673a10eaabfef990117478d (patch) | |
tree | fd902de2016550dcac97c632bf1a8a900bc301ae /src/System.Private.CoreLib | |
parent | 88ebe4fab2945d6f45894e0e58f64a3054142664 (diff) | |
download | coreclr-13405da4ba21095f7673a10eaabfef990117478d.tar.gz coreclr-13405da4ba21095f7673a10eaabfef990117478d.tar.bz2 coreclr-13405da4ba21095f7673a10eaabfef990117478d.zip |
Change StreamReader.ReadBufferAsync to return ValueTask<int> (#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.
Diffstat (limited to 'src/System.Private.CoreLib')
-rw-r--r-- | src/System.Private.CoreLib/shared/System/IO/StreamReader.cs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/System.Private.CoreLib/shared/System/IO/StreamReader.cs b/src/System.Private.CoreLib/shared/System/IO/StreamReader.cs index 0ebcede1e0..cbfc7290d9 100644 --- a/src/System.Private.CoreLib/shared/System/IO/StreamReader.cs +++ b/src/System.Private.CoreLib/shared/System/IO/StreamReader.cs @@ -1238,7 +1238,7 @@ namespace System.IO return new ValueTask<int>(t); } - private async Task<int> ReadBufferAsync() + private async ValueTask<int> ReadBufferAsync() { _charLen = 0; _charPos = 0; |