CompletionStage.acceptEither

Returns a new CompletionStage that, when either this or the other given stage complete normally, is executed with the corresponding result as argument to the supplied action.

See the {@link CompletionStage} documentation for rules covering exceptional completion.

@param other the other CompletionStage @param action the action to perform before completing the returned CompletionStage @return the new CompletionStage

  1. CompletionStage!(void) acceptEither(CompletionStage!(T) other, Action action)
  2. CompletionStage!(void) acceptEither(CompletionStage!(T) other, Consumer!(T) action)
    interface CompletionStage(T)
    static if(!(is(T == void)))
    acceptEither
    (,
    Consumer!(T) action
    )

Meta