code: @Override
      public boolean cancel(boolean mayInterruptIfRunning) {
          if (m_isDone == true) {
              return false;
          }
          m_isDone = true;
  
          if (m_pendingException != null) {
              return false;
          }
  
          m_cancelResult = m_schedFuture.cancel(false);
  
          if ((m_cancelResult != true) || (m_defaultFuture != null)) {
              // Push the cancel call to the Default Executor Future if it has progressed that far.
              try {
                  this.m_coordinationLatch.await();
              } catch (InterruptedException ie) {
                  // Try to proceed.
              }
  
              if (m_defaultFuture != null) {
                  m_cancelResult = m_defaultFuture.cancel(mayInterruptIfRunning);
              }
          }
  
          if (m_cancelResult == true) {
              m_pendingException = new CancellationException();
              m_scheduledExecutorQueue.remove(this);
          }
  
          // Let get() finish
          this.m_coordinationLatch.countDown();
  
          return m_cancelResult;
      }
docs: /*
  (non-Javadoc)
  
  @see java.util.concurrent.Future#cancel(boolean)