摘要: class BoundedBuffer { final Lock lock = new ReentrantLock(); final Condition notFull = lock.newCondition(); final Condition notEmpty = lock.newCondition(); final Object[] items = new Object[100]; int putptr, takeptr, count; public void put(Object x) throws InterruptedException { ... 阅读全文
posted @ 2013-09-12 17:06 张兰云 阅读(591) 评论(0) 推荐(0) 编辑