Class FutureUtils

java.lang.Object
io.servicetalk.concurrent.internal.FutureUtils

public final class FutureUtils extends Object
A set of utilities for interacting with Future.
  • Method Details

    • awaitTermination

      public static void awaitTermination(Future<Void> future)
      Await the completion of the passed Future.
      Parameters:
      future - Future to await termination.
    • awaitResult

      public static <T> T awaitResult(Future<T> future)
      Await the completion of the passed Future and return its result.
      Type Parameters:
      T - the result type.
      Parameters:
      future - Future to await completion.
      Returns:
      the result of the Future.