code: @Override
    public void execute(Runnable r) {
      Preconditions.checkNotNull(r, "'r' must not be null.");
      boolean scheduleTaskRunner = false;
      synchronized (internalLock) {
        waitQueue.add(r);
  
        if (!isThreadScheduled) {
          isThreadScheduled = true;
          scheduleTaskRunner = true;
        }
      }
      if (scheduleTaskRunner) {
        boolean threw = true;
        try {
          executor.execute(taskRunner);
          threw = false;
        } finally {
          if (threw) {
            synchronized (internalLock) {
              // It is possible that at this point that there are still tasks in
              // the queue, it would be nice to keep trying but the error may not
              // be recoverable.  So we update our state and propogate so that if
              // our caller deems it recoverable we won't be stuck.
              isThreadScheduled = false;
            }
          }
        }
      }
    }
docs: Runs the given runnable strictly after all Runnables that were submitted
  before it, and using the {@code executor} passed to the constructor.     .