synchronized(root) { if (updateNeeded) { nextUpdate = System.currentTimeMillis(); root.notify(); while (updateNeeded) { try { root.wait(); } catch (InterruptedException ie) { } } } } return true;
synchronized(root) { if (updateNeeded) { nextUpdate = System.currentTimeMillis(); root.notify(); while (updateNeeded) { try { root.wait(); } catch (InterruptedException ie) { } } }
    public boolean exitAllowed() {        synchronized(root) {            if (updateNeeded) {                nextUpdate = System.currentTimeMillis();                root.notify();                while (updateNeeded) {                    try {                        root.wait();                    } catch (InterruptedException ie) {                    }                }            }        }        return true;    }