@@ -0,0 +1,1013 @@
+package cn.byhieg.threadtutorialtest.char05test;%0A%0Aimport cn.byhieg.threadtutorial.char05.more2more.list.Customer;%0Aimport cn.byhieg.threadtutorial.char05.more2more.list.MyQueue;%0Aimport cn.byhieg.threadtutorial.char05.more2more.list.Producer;%0Aimport junit.framework.TestCase;%0A%0A/**%0A * Created by byhieg on 17/2/1.%0A * Mail to byhieg@gmail.com%0A */%0Apublic class More2moreListTest extends TestCase %7B%0A%0A    public void testList() throws Exception%7B%0A        MyQueue queue = new MyQueue();%0A        new Thread(new Producer(queue)).start();%0A        new Thread(new Producer(queue)).start();%0A        new Thread(new Producer(queue)).start();%0A        new Thread(new Producer(queue)).start();%0A        new Thread(new Producer(queue)).start();%0A%0A%0A        new Thread(new Customer(queue)).start();%0A        new Thread(new Customer(queue)).start();%0A        new Thread(new Customer(queue)).start();%0A        new Thread(new Customer(queue)).start();%0A        new Thread(new Customer(queue)).start();%0A%0A%0A        Thread.sleep(1000 * 5);%0A    %7D%0A%0A%7D%0A

添加ThreadTurorial中多对多生产者/消费者