代码改变世界

随笔档案-2010年1月7日

限制线程的执行个数

2010-01-07 21:43 by c#在路上, 3207 阅读, 收藏,
摘要: 限制只有三个线程能够执行代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--usingSystem;usingSystem.Threading;namespaceLimitThread{classProgram{staticSemaphoresemah... 阅读全文

线程服务的停止与启动

2010-01-07 21:06 by c#在路上, 5258 阅读, 收藏,
摘要: 自己写服务的话,有线程的启动与停止,所以写了简单的实现的代码。代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--usingSystem;usingSystem.Collections.Generic;usingSystem.Text;namespac... 阅读全文