2011年8月2日

.NET 中的线程池和[ThreadStatic]属性

摘要: 本文实验了一下.NET 中的线程池和[ThreadStatic]属性的作用:class Program{ [ThreadStatic] static int Number; static void Main(string[] args) { //for (int i = 0; i < 10; i++) //{ // ThreadPool.QueueUserWorkItem(new WaitCallback(ThreadProc)); //} for (int i = 0; i < 10; i++) { Thread t = new Thread(delegate() { Threa 阅读全文

posted @ 2011-08-02 16:38 薛定谔的旺财(刘杨) 阅读(1175) 评论(2) 推荐(0) 编辑

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
点击右上角即可分享
微信分享提示