diff options
author | Ben Adams <thundercat@illyriad.co.uk> | 2019-03-28 23:49:08 -0700 |
---|---|---|
committer | Jan Kotas <jkotas@microsoft.com> | 2019-03-28 23:49:08 -0700 |
commit | dc0d0721aca6c6b1da99346dfb95de78d7c83d6f (patch) | |
tree | 5e43cc386402bbf43155c16a3cf13afa19e1dddd | |
parent | ecf92d0664acc8a36ee7ae69efefca5bb5a7dee5 (diff) | |
download | coreclr-dc0d0721aca6c6b1da99346dfb95de78d7c83d6f.tar.gz coreclr-dc0d0721aca6c6b1da99346dfb95de78d7c83d6f.tar.bz2 coreclr-dc0d0721aca6c6b1da99346dfb95de78d7c83d6f.zip |
Avoid boxing allocations for async in Tier0 (#22984)
-rw-r--r-- | src/System.Private.CoreLib/shared/System/Runtime/CompilerServices/AsyncMethodBuilder.cs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/System.Private.CoreLib/shared/System/Runtime/CompilerServices/AsyncMethodBuilder.cs b/src/System.Private.CoreLib/shared/System/Runtime/CompilerServices/AsyncMethodBuilder.cs index 3592fd84ca..47853b17d7 100644 --- a/src/System.Private.CoreLib/shared/System/Runtime/CompilerServices/AsyncMethodBuilder.cs +++ b/src/System.Private.CoreLib/shared/System/Runtime/CompilerServices/AsyncMethodBuilder.cs @@ -399,6 +399,8 @@ namespace System.Runtime.CompilerServices /// <typeparam name="TStateMachine">Specifies the type of the state machine.</typeparam> /// <param name="awaiter">The awaiter.</param> /// <param name="stateMachine">The state machine.</param> + // AggressiveOptimization to workaround boxing allocations in Tier0 until: https://github.com/dotnet/coreclr/issues/14474 + [MethodImpl(MethodImplOptions.AggressiveOptimization)] public void AwaitUnsafeOnCompleted<TAwaiter, TStateMachine>( ref TAwaiter awaiter, ref TStateMachine stateMachine) where TAwaiter : ICriticalNotifyCompletion |