摘要: class Program { static void Main() { var b1 = new BlockingCollection(); ThreadPool.QueueUserWorkItem(ConSumeItems, b1); for (int i = 0; i... 阅读全文
posted @ 2019-01-06 18:51 一只桔子2233 阅读(109) 评论(0) 推荐(0) 编辑
摘要: 30.3.2 Monitor类和同步块 30.3.3 ReaderWriterLockSlim类 阅读全文
posted @ 2019-01-06 16:49 一只桔子2233 阅读(158) 评论(0) 推荐(0) 编辑
摘要: /// /// 其他混合锁 /// internal sealed class AnotherHybridLock : IDisposable { //由基元用户模式构造(Interlocked的方法)使用 private int _waiters = 0; //AutoResetEvent 是基元... 阅读全文
posted @ 2019-01-06 10:49 一只桔子2233 阅读(318) 评论(0) 推荐(0) 编辑