private void workLoop() {
void workLoop() {
    private void workLoop() {        boolean cont = true;        while (cont) {            doWork();            synchronized (this) {                cont = !doClose;            }        }        synchronized (this) {            closed = true;            notifyAll();        }    }