code: private boolean processCancelRequests() {
          // Try to make this as fast as possible. Don't need to sync
          // since if a cancel gets added after checking the size, we will
          // see it next time.
          if (cancelList.size() == 0) {
              return false;
          }
  
          boolean needSelectToOccur = false;
  
          final boolean bTrace = TraceComponent.isAnyTracingEnabled();
          synchronized (cancelList) {
              for (CancelRequest req : this.cancelList) {
                  if (req.state == CancelRequest.Ready_To_Cancel) {
                      if (bTrace && tc.isDebugEnabled()) {
                          Tr.debug(this, tc, "cancelling key " + req.key);
                      }
                      req.key.cancel();
                      req.state = CancelRequest.Ready_To_Signal_Done;
                      needSelectToOccur = true;
                  }
              }
          } // end-sync
          return needSelectToOccur;
      }
docs: Process the actual key cancel requests now. This does not
  remove the item from the list as it needs a second pass
  through select() before notifyCancelRequests handles that step.
  
  @return boolean, true if any key was cancelled