Thread th = new Thread(Func); //创建线程
th.Start();//启动线程
private void Func()//线程执行的方法
{
}
lock (this) //锁
{
}
Thread th = new Thread(new ThreadStart(delegate {
GetInfo(strinfo);
}));
th.Start();
//ThreadPool 线程池.
ThreadPool.QueueUserWorkItem(new WaitCallback(delegate {
GetInfo(strinfo);
}));
//线程池是不可控制的.
欢迎光临 CSkin博客 (http://bbs.cskin.net/) | Powered by Discuz! X3.2 |