childref.Start(); var t1 = Task.Run(() => { Console.WriteLine("TaskRun启动的线程:"+Thread.CurrentThread.ManagedThreadId); }); Task.WaitAll(new Task[] { childref, t1 }); Console.WriteLine("所有线程结束后:"+ Thread.CurrentThread.ManagedThreadId);
标签:Task,CurrentThread,Thread,ManagedThreadId,t1,task,waitAll From: https://www.cnblogs.com/Insist-Y/p/16598416.html