摘要:
用ManulResetEvent实现生产者消费者,声明了两个ManulResetEvent类型变量,其实用一个也可以。现在用AutoResetEvent实现。Auto和Manual的区别是Auto只唤醒一个线程,Manual是唤醒所有。 public class AreTest ... 阅读全文
posted @ 2015-06-28 18:48
nbu_djw
阅读(187)
评论(0)
推荐(0)
摘要:
public class MreTest1 { public static ManualResetEvent mre = new ManualResetEvent(false); public static void Add() ... 阅读全文
posted @ 2015-06-28 17:18
nbu_djw
阅读(168)
评论(0)
推荐(0)
摘要:
private static Mutex m = new Mutex(); static bool p = true; public static void A() { while (true) { ... 阅读全文
posted @ 2015-06-28 14:13
nbu_djw
阅读(137)
评论(0)
推荐(0)
浙公网安备 33010602011771号