docs: public void cancel() {
      lock.lock();
      try {
        thread.newTasksMayBeScheduled = false;
        queue.clear();
        condition.signal();
        if (reachedJob != null) {
          clock.disableJob(reachedJob);
        }
      } finally {
        lock.unlock();
      }
    }