code: public static <V> ListenableFuture<V> listenInPoolThread(Future<V> future, Executor executor) {
      checkNotNull(executor);
      if (future instanceof ListenableFuture) {
        return (ListenableFuture<V>) future;
      }
      return new ListenableFutureAdapter<V>(future, executor);
    }
docs: Submits a blocking task for the given {@link Future} to provide {@link ListenableFuture}
  functionality.
  
  <p><b>Warning:</b> If the input future does not already implement {@code ListenableFuture}, the
  returned future will emulate {@link ListenableFuture#addListener} by submitting a task to the
  given executor at the first call to {@code addListener}. The task must be started by the
  executor promptly, or else the returned {@code ListenableFuture} may fail to work. The task's
  execution consists of blocking until the input future is {@linkplain Future#isDone() done}, so
  each call to this method may claim and hold a thread for an arbitrary length of time. Use of
  bounded executors or other executors that may fail to execute a task promptly may result in
  deadlocks.
  
  <p>Prefer to create {@code ListenableFuture} instances with {@link SettableFuture}, {@link
  MoreExecutors#listeningDecorator( java.util.concurrent.ExecutorService)}, {@link
  ListenableFutureTask}, {@link AbstractFuture}, and other utilities over creating plain {@code
  Future} instances to be upgraded to {@code ListenableFuture} after the fact.
  
  @since 12.0