使用线程的几种方式

1、使用Thread 默认是前台线程
2、使用ThreadPool.QueueUserWorkItem 默认是后台线程
3、使用 System.ComponentModel.BackgroudWorker  cs程序使用比较多 2.0以后版本
4、使用System.Threading.Tasks.Task  4.0以后版本
5、循环处理,还可以使用System.Threading.Tasks. Parallel.Invoke() ,PLinq

 

posted @ 2016-01-22 15:46  feitu324  阅读(57)  评论(0编辑  收藏  举报