public void waitForFinish() {
        synchronized (statusLock) {
            while (!isFinished() && getStatus() != Watchable.STOPPED) {
                try {
                    statusLock.wait();
                } catch (InterruptedException ex) {
                    // ignore
                }
            }
        }
    }