supplyAsync

Returns a new CompletableFuture that is asynchronously completed by a task running in the given executor with the value obtained by calling the given Supplier.

@param supplier a function returning the value to be used to complete the returned CompletableFuture @param executor the executor to use for asynchronous execution @param <U> the function's return type @return the new CompletableFuture

  1. CompletableFuture!(U) supplyAsync(Supplier!(U) supplier)
  2. CompletableFuture!(U) supplyAsync(Supplier!(U) supplier, Executor executor)
    supplyAsync
    (
    U
    )
    (
    Supplier!(U) supplier
    ,)

Meta