摘要: 常用并发辅助类 CountDownLatch Semaphore CyclicBarrier, 都基于ReentrantLock实现。1 Semaphores are often used to restrict the number of threads than can* access s... 阅读全文
posted @ 2015-03-10 15:10 xiongjianjun 阅读(99) 评论(0) 推荐(0) 编辑
摘要: Callable Runable和Future FutureTask的使用1 先看看接口定义public interface Runnable {public abstract void run();//定义为void,和thread一样,无法返回执行结果}public interface Call... 阅读全文
posted @ 2015-03-10 13:50 xiongjianjun 阅读(142) 评论(0) 推荐(0) 编辑