diff --git a/src/Compilers/Core/Portable/InternalUtilities/SemaphoreSlimExtensions.cs b/src/Compilers/Core/Portable/InternalUtilities/SemaphoreSlimExtensions.cs index 00cd69a0e04e2817c5ebe74f779abb507760b1c3..fc789735c6f25ba64d93077f1565184768fd671b 100644 --- a/src/Compilers/Core/Portable/InternalUtilities/SemaphoreSlimExtensions.cs +++ b/src/Compilers/Core/Portable/InternalUtilities/SemaphoreSlimExtensions.cs @@ -14,7 +14,8 @@ public static SemaphoreDisposer DisposableWait(this SemaphoreSlim semaphore, Can return new SemaphoreDisposer(semaphore); } - public async static Task DisposableWaitAsync(this SemaphoreSlim semaphore, CancellationToken cancellationToken = default) + [PerformanceSensitive("https://github.com/dotnet/roslyn/issues/36114", OftenCompletesSynchronously = true)] + public async static ValueTask DisposableWaitAsync(this SemaphoreSlim semaphore, CancellationToken cancellationToken = default) { await semaphore.WaitAsync(cancellationToken).ConfigureAwait(false); return new SemaphoreDisposer(semaphore); diff --git a/src/Interactive/Host/Microsoft.CodeAnalysis.InteractiveHost.csproj b/src/Interactive/Host/Microsoft.CodeAnalysis.InteractiveHost.csproj index 6169bc8e19acc680ac2ff31e20e11efc4b256859..4da239c119bd37a7e62b107c37febbaa0e015fa7 100644 --- a/src/Interactive/Host/Microsoft.CodeAnalysis.InteractiveHost.csproj +++ b/src/Interactive/Host/Microsoft.CodeAnalysis.InteractiveHost.csproj @@ -42,6 +42,7 @@ +