android/guava/src/com/google/common/util/concurrent/ExecutionSequencer.java
public <T> ListenableFuture<T> submit(final Callable<T> callable, Executor executor) {
    checkNotNull(callable);
    return submitAsync(
        new AsyncCallable<T>() {
          @Override
          public ListenableFuture<T> call() throws Exception {
            return immediateFuture(callable.call());
          }

          @Override
          public String toString() {
            return callable.toString();
          }
        },
        executor);
  }
public <T> ListenableFuture<T> submit(final Callable<T> callable, Executor executor) {
    checkNotNull(callable);
    return submitAsync(
        new AsyncCallable<T>() {
          @Override
          public ListenableFuture<T> call() throws Exception {
            return immediateFuture(callable.call());
          }

          @Override
          public String toString() {
            return callable.toString();
          }
        },
        executor);
  }
Enqueues a task to run when the previous task (if any) completes.

<p>Cancellation does not propagate from the output future to a callable that has begun to
execute, but if the output future is cancelled before {@link Callable#call()} is invoked,
{@link Callable#call()} will not be invoked.