尋尋覓覓

共同奉獻

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

2011年8月14日

摘要: usingSystem;usingSystem.Net;usingSystem.Text;usingSystem.Net.Sockets;usingSystem.Collections.Generic;namespaceCustomLibraries.Threading{publicstaticclassConnectionPool{///<summary>///Queueofavailablesocketconnections.///</summary>privatestaticQueue<CustomSocket>availableSockets=nul 阅读全文
posted @ 2011-08-14 16:11 ★海戰鷹 阅读(643) 评论(0) 推荐(0) 编辑

摘要: 多线程 非安全实例usingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Text;usingSystem.Threading;namespaceThreadSample{classProgram{staticvoidMain(string[]args){intnumThreads=20;ShareStatestate=newShareState();Thread[]threads=newThread[numThreads];for(inti=0;i<numThreads;i++){threads[ 阅读全文
posted @ 2011-08-14 13:03 ★海戰鷹 阅读(248) 评论(0) 推荐(0) 编辑