ForkJoinTask.adapt

Returns a new {@code ForkJoinTask} that performs the {@code run} method of the given {@code Runnable} as its action, and returns the given result upon {@link #join}.

@param runnable the runnable action @param result the result upon completion @param (T) the type of the result @return the task

  1. ForkJoinTask!(T) adapt(Runnable runnable, T result)
    class ForkJoinTask(V)
    static
    adapt
    (
    T
    )
    (
    Runnable runnable
    ,)
  2. ForkJoinTask!(T) adapt(Callable!(T) callable)

Meta