C# 线程
1、ThreadPool不支持线程的取消、完成、失败通知等交互性操作
2、ThreadPool不支持线程执行的先后次序
//通过匿名委托创建 Thread thread1 = new Thread(delegate () { Console.WriteLine("我是通过匿名委托创建的线程"); }); thread1.Start();
//通过Lambda表达式创建 Thread thread2 = new Thread(() => Console.WriteLine("我是通过Lambda表达式创建的委托")); thread2.Start();
//通过函数名称 Thread thread3 = new System.Threading.Thread(new System.Threading.ThreadStart(ThreadStart)); thread3.Start(); private void ThreadStart() { }