async and await are single threaded Really?
问题 I created following code: using System; using System.Threading.Tasks; namespace ConsoleApplication2 { class Program { static void Main() { Console.WriteLine("M Start"); MyMethodAsync(); Console.WriteLine("M end"); Console.Read(); } static async Task MyMethodAsync() { await Task.Yield(); Task<int> longRunningTask = LongRunningOperationAsync(); Console.WriteLine("M3"); //and now we call await on the task int result = await longRunningTask; //use the result Console.WriteLine(result); } static