public void addListener(List<IoFutureListener> listeners) {
        if (listeners == null) {
            return;
        }

        synchronized (lock) {
            if (this.listeners == null) {
                this.listeners = new ArrayList<IoFutureListener>();
            }
            this.listeners.addAll(listeners);

            if (isDone()) {
                for (IoFutureListener listener : listeners) {
                    complete(listener);
                }
            }
        }
    }
A lock used by the wait() method
lts-core/src/main/java/com/github/ltsopensource/nio/handler/IoFuture.java