synchronized void doStop() {
      if (selector != null) {
        selector.wakeup();
        Thread.yield();
      }
      if (acceptChannel != null) {
        try {
          acceptChannel.socket().close();
        } catch (IOException e) {
          LOG.info(getName() + ": exception in closing listener socket. " + e);
        }
      }
      readPool.shutdownNow();
    }
Updating the readSelector while it's being used is not thread-safe, so the connection must
be queued. The reader will drain the queue and update its readSelector before performing
the next select
hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/SimpleRpcServer.java