From: Stephen Toub Date: Thu, 1 Feb 2018 22:22:00 +0000 (-0500) Subject: Use ValueTask shared from corelib (dotnet/corefx#26636) X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=041e111db2628b71eb8f8995acbd0e97f68bb988;p=platform%2Fupstream%2Fcoreclr.git Use ValueTask shared from corelib (dotnet/corefx#26636) Signed-off-by: dotnet-bot-corefx-mirror --- diff --git a/src/mscorlib/shared/System/Runtime/CompilerServices/AsyncValueTaskMethodBuilder.cs b/src/mscorlib/shared/System/Runtime/CompilerServices/AsyncValueTaskMethodBuilder.cs index 23da48eacb..ac9886a4e3 100644 --- a/src/mscorlib/shared/System/Runtime/CompilerServices/AsyncValueTaskMethodBuilder.cs +++ b/src/mscorlib/shared/System/Runtime/CompilerServices/AsyncValueTaskMethodBuilder.cs @@ -40,7 +40,12 @@ namespace System.Runtime.CompilerServices /// The state machine instance, passed by reference. [MethodImpl(MethodImplOptions.AggressiveInlining)] public void Start(ref TStateMachine stateMachine) where TStateMachine : IAsyncStateMachine => + // will provide the right ExecutionContext semantics +#if netstandard + _methodBuilder.Start(ref stateMachine); +#else AsyncMethodBuilder.Start(ref stateMachine); // will provide the right ExecutionContext semantics +#endif /// Associates the builder with the specified state machine. /// The state machine instance to associate with the builder.