code: public static Future doInBackground(Callable callable) {
          final ExecutorService executor = Executors.newSingleThreadExecutor();
          Future future = executor.submit(callable);
  
          if(executor.isTerminated()) {
              executor.shutdown();
          }
  
          return future;
      }
docs: Submits a Callable object and returns a Future ready to use.
  
  @param callable the callable you want to submit
  @return a Future object