All pastes #330315 Raw Edit

Miscellany

public java v1 · immutable
#330315 ·published 2007-01-27 20:22 UTC
rendered paste body
    public void run() {        System.out.println("Floor starting...");        while (numCustomers > 0) {            try {                Thread.sleep(rand.nextInt(MAX_DELAY * MILLI_PER_SEC));                line.enqueue(createCustomer());                System.out.println("Customer entering line...");                synchronized(this) {                    this.notifyAll();                }            } catch (InterruptedException e) {                e.printStackTrace();            }        }    }