submits callable after waiting future to complete
@param <V>
@param waiter
@param callable
@return
970317
public <V> Future<V> submitAfter(Waiter waiter, Callable<V> callable)
    {
        return submitAfter(waiter, callable, Long.MAX_VALUE, TimeUnit.MILLISECONDS);
    }
27941
public static <T> Future<T> submit(Callable<T> task) {
		return executor.submit(task);
	}
955342
public Future<V> submit(Runnable task, V result) {
        if (task == null) throw new NullPointerException();
        NotifyingFuture<V> f = executor.submit(task, result);
        f.setListener(listener);
        return f;
    }
160184
function Waiter() {
    if (!(this instanceof Waiter)) {
        return new Waiter();
    }

    var self = this;

    // found values
    self.values = {};

    // callback when done
    self.callback = null;

    self.resolved = false;

    self.count = 0;
}
1346068
public ServiceDirectoryFuture submitAsyncRequest(ProtocolHeader h, Protocol request, WatcherRegistration wr){
        ServiceDirectoryFuture future = new ServiceDirectoryFuture();
        queuePacket(h, request, null, null, future, wr);
        return future;
    }
1329721
private <T> void submitQuery(QueryRequest request, CompletableFuture<T> future) {
    submit(new QueryAttempt<>(sequencer.nextRequest(), request, future));
  }
864988
public ListenableFuture<T> updateAsync(final TwilioRestClient client) {
        return Twilio.getExecutorService().submit(new Callable<T>() {
            public T call() {
                return update(client);
            }
        });
    }
553589
public V action(Callable<V> callable) throws Exception {
        Exception re;
        RetryState retryState = retryStrategy.getRetryState();
        do {
            try {
                return callable.call();
            } catch (Exception e) {
                re = e;
                if (Thread.interrupted() || isInterruptTransitively(e)) {
                    re = new InterruptedException(e.getMessage());
                    break;
                }
                if (!transientExceptionDetector.isTransient(e)) {
                    break;
                }
            }
            enqueueRetryEvent(new RetryEvent(this, retryState, re));
            retryState.delayRetry();
        } while (retryState.hasRetries());
        throw re;
    }
647679
public void registerOperation(final ListenableFuture<?> future) {
    count.incrementAndGet();
    Futures.addCallback(future, new FutureCallback<Object>() {
      @Override
      public void onSuccess(Object result) {
        onOperationCompletion();
      }

      @Override
      public void onFailure(Throwable t) {
        onOperationCompletion();
      }
    }, MoreExecutors.directExecutor());
  }
58861
static <T> CompletableFuture<T> toFuture(Call<T> callToWrap) {
        final CallbackAdaptor<T> completableFuture = new CallbackAdaptor<>();
        callToWrap.enqueue(completableFuture);
        return completableFuture;
    }
622599
public Future<?> submit(Fork fork) {
    LOG.info(String.format("Submitting fork %d of task %s", fork.getIndex(), fork.getTaskId()));
    return this.forkExecutor.submit(fork);
  }
1076094
public static <T> T queueAndWait (
        RunQueue runq, final String name, final Callable<T> action)
        throws ServiceException
    {
        final ServletWaiter<T> waiter = new ServletWaiter<T>(name);
        runq.postRunnable(new Runnable() {
            public void run () {
                try {
                    waiter.postSuccess(action.call());
                } catch (final Exception e) {
                    waiter.postFailure(e);
                }
            }
        });
        return waiter.waitForResult();
    }
1013052
public static <T> Callable<T> callable(CheckedCallable<T> callable) {
        return Unchecked.callable(callable, Unchecked.RETHROW_ALL);
    }
1183700
def submit(self, call, *args, **kwargs):
        
        future = StoredFuture(call, *args, **kwargs)
        self._queue.put(future)
        self._ensure_worker()
        return future
556462
public ListenableFuture<T> createAsync(final TwilioRestClient client) {
        return Twilio.getExecutorService().submit(new Callable<T>() {
            public T call() {
                return create(client);
            }
        });
    }
1252390
def waiter(self):
        
        assert self._onetime, 'One time events only can invoke waiter'
        if not self._waiter:
            self._waiter = get_event_loop().create_future()
            if self.fired():
                self._waiter.set_result(None)
        return self._waiter
1347887
public <T extends MwsObject> Future<T> callAsync(final MwsRequestType type,
            final MwsObject requestData) {
        return getExecutorService().submit(new Callable<T>() {
            @Override
            public T call() {
                return MwsConnection.this.call(type, requestData);
            }
        });
    }