public void addListener(IoFutureListener listener) {
        if (listener == null) {
            return;
        }
        synchronized (lock) {
            if (listeners == null) {
                listeners = new ArrayList<IoFutureListener>();
            }
            listeners.add(listener);
            if (isDone()) {
                complete(listener);
            }
        }
    }
A lock used by the wait() method
lts-core/src/main/java/com/github/ltsopensource/nio/handler/IoFuture.java