private boolean postCommand(Runnable cmd) {
        int qlen;
        synchronized (this) {
            if (state == CLOSED) {
                return false;
            }
            queue.enqueue(cmd);
            qlen = queue.size();
        }
        if (qlen == parent.getEventsBeforeWakeup()) {
            selector.wakeup();
        }
        return true;
    }
A single reactor/scheduler thread inside a potentially
multi-threaded {@link Transport}.
jrt/src/com/yahoo/jrt/TransportThread.java