using System;
using System.Threading;
using System.Threading.Tasks;
public class Test
{
public static void Main()
{
A().Wait();
}
static async Task A() {
await B();
Console.WriteLine(Thread.CurrentThread.ManagedThreadId);
}
static async Task B() {
await C();
Console.WriteLine(Thread.CurrentThread.ManagedThreadId);
}
static async Task C() {
await Task.Yield();
Console.WriteLine(Thread.CurrentThread.ManagedThreadId);
}
}
dXNpbmcgU3lzdGVtOwp1c2luZyBTeXN0ZW0uVGhyZWFkaW5nOwp1c2luZyBTeXN0ZW0uVGhyZWFkaW5nLlRhc2tzOwoKcHVibGljIGNsYXNzIFRlc3QKewoJcHVibGljIHN0YXRpYyB2b2lkIE1haW4oKQoJewoJCUEoKS5XYWl0KCk7Cgl9CgkKCXN0YXRpYyBhc3luYyBUYXNrIEEoKSB7CgkJYXdhaXQgQigpOwoJCUNvbnNvbGUuV3JpdGVMaW5lKFRocmVhZC5DdXJyZW50VGhyZWFkLk1hbmFnZWRUaHJlYWRJZCk7Cgl9CgkKCXN0YXRpYyBhc3luYyBUYXNrIEIoKSB7CgkJYXdhaXQgQygpOwoJCUNvbnNvbGUuV3JpdGVMaW5lKFRocmVhZC5DdXJyZW50VGhyZWFkLk1hbmFnZWRUaHJlYWRJZCk7Cgl9CgkKCXN0YXRpYyBhc3luYyBUYXNrIEMoKSB7CgkJYXdhaXQgVGFzay5ZaWVsZCgpOwoJCUNvbnNvbGUuV3JpdGVMaW5lKFRocmVhZC5DdXJyZW50VGhyZWFkLk1hbmFnZWRUaHJlYWRJZCk7Cgl9Cn0=