code: public static <TResult> Task<TResult> call(final Callable<TResult> callable, Executor executor,
        final CancellationToken ct) {
      final bolts.TaskCompletionSource<TResult> tcs = new bolts.TaskCompletionSource<>();
      try {
        executor.execute(new Runnable() {
          @Override
          public void run() {
            if (ct != null && ct.isCancellationRequested()) {
              tcs.setCancelled();
              return;
            }
  
            try {
              tcs.setResult(callable.call());
            } catch (CancellationException e) {
              tcs.setCancelled();
            } catch (Exception e) {
              tcs.setError(e);
            }
          }
        });
      } catch (Exception e) {
        tcs.setError(new ExecutorException(e));
      }
  
      return tcs.getTask();
    }
docs: Invokes the callable using the given executor, returning a Task to represent the operation.