public void notifyListeners() {
        synchronized (lock) {
            done = true;
            if (this.listeners != null) {
                for (IoFutureListener ioFutureListener : listeners) {
                    complete(ioFutureListener);
                }
            }
        }
    }
A lock used by the wait() method
lts-core/src/main/java/com/github/ltsopensource/nio/handler/IoFuture.java