文章分类 - 线程
深入浅出多线程系列之五:一些同步构造(下篇)
摘要:1:CountdownEventFramework 4.0提供了一个CountdownEvent类,主要是让你等待多个线程。考虑下这样的场景:有一个任务,3个人去做,你需要等这3个人都做完了才继续下一步操作。下面就是:classThread15{staticCountdownEvent_countdown=newCountdownEvent(3);publicstaticvoidMainThread(){newThread(SaySomething).Start("I'mthread1");newThread(SaySomething).Start("I&
阅读全文
posted @ 2011-06-22 14:04
肉丝
浙公网安备 33010602011771号