code: public synchronized void remove(Runnable runnable) {
      Iterator<ScheduledRunnable> iterator = runnables.iterator();
      while (iterator.hasNext()) {
        if (iterator.next().runnable == runnable) {
          iterator.remove();
        }
      }
    }
docs: Remove a runnable from the queue.
  
  @param runnable  Runnable to remove.