java 多线程 阻塞队列
摘要:
code:import java.util.concurrent.ArrayBlockingQueue;import java.util.concurrent.BlockingQueue;public class Queue { public static void main(String[] args) { BlockingQueue bqueue = new ArrayBlockingQueue(20); for (int i = 0; i < 30; i++) { try {bqueue.put(i);} catch (InterruptedException e) {// TO. 阅读全文
posted @ 2012-08-20 19:27 漩涡鸣人 阅读(394) 评论(0) 推荐(0) 编辑