public void produce() throws Exception{
        synchronized (waiter) {
            
            if(waiter.getProductSize()<10){
                System.out.println("product 开始生产");
                try {
                    Thread.sleep(PRODUCE_TIME);
                    Random random = new Random();
                    Product product = new Product(random.nextLong());
                    waiter.addProduct(product);
                    System.out.println("product 生产好了");
                    waiter.notifyAll();
                } catch (InterruptedException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
                }
                
            }
            else{
                System.out.println("不生产，有货！");
                waiter.wait();
            }
            
        }
    }