From 526ee018e4ac734398159b17a0c6dc11aaff8a65 Mon Sep 17 00:00:00 2001 From: Adam Sitnik Date: Wed, 21 Jul 2021 16:46:51 +0200 Subject: [PATCH] use PoolingAsyncValueTaskMethodBuilder in BufferedFileStreamStrategy --- .../src/System/IO/Strategies/BufferedFileStreamStrategy.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/libraries/System.Private.CoreLib/src/System/IO/Strategies/BufferedFileStreamStrategy.cs b/src/libraries/System.Private.CoreLib/src/System/IO/Strategies/BufferedFileStreamStrategy.cs index 9aaa16ff51941..00d0d2a59b9a6 100644 --- a/src/libraries/System.Private.CoreLib/src/System/IO/Strategies/BufferedFileStreamStrategy.cs +++ b/src/libraries/System.Private.CoreLib/src/System/IO/Strategies/BufferedFileStreamStrategy.cs @@ -423,6 +423,7 @@ private async ValueTask ReadFromNonSeekableAsync(Memory destination, } } + [AsyncMethodBuilder(typeof(PoolingAsyncValueTaskMethodBuilder<>))] private async ValueTask ReadAsyncSlowPath(Task semaphoreLockTask, Memory buffer, CancellationToken cancellationToken) { Debug.Assert(_asyncActiveSemaphore != null); @@ -705,6 +706,7 @@ private async ValueTask WriteToNonSeekableAsync(ReadOnlyMemory source, Can } } + [AsyncMethodBuilder(typeof(PoolingAsyncValueTaskMethodBuilder))] private async ValueTask WriteAsyncSlowPath(Task semaphoreLockTask, ReadOnlyMemory source, CancellationToken cancellationToken) { Debug.Assert(_asyncActiveSemaphore != null);