code: private int unregisterHandles() {
          int cancelledHandles = 0;
          for (;;) {
              AcceptorOperationFuture future = cancelQueue.poll();
              if (future == null) {
                  break;
              }
  
              // close the channels
              for (SocketAddress a : future.getLocalAddresses()) {
                  H handle = boundHandles.remove(a);
                  
                  if (handle == null) {
                      continue;
                  }
  
                  try {
                      close(handle);
                      wakeup(); // wake up again to trigger thread death
                  } catch (Throwable e) {
                      ExceptionMonitor.getInstance().exceptionCaught(e);
                  } finally {
                      cancelledHandles++;
                  }
              }
  
              future.setDone();
          }
  
          return cancelledHandles;
      }
docs: This method just checks to see if anything has been placed into the
  cancellation queue.  The only thing that should be in the cancelQueue
  is CancellationRequest objects and the only place this happens is in
  the doUnbind() method.