tuweni / org.apache.tuweni.concurrent / AsyncResult / whenComplete

whenComplete

abstract fun whenComplete(action: BiConsumer<in T, in Throwable!>!): AsyncResult<T>! (source)

Returns a new result that completes with the same value or exception as this result, after executing the given action with this result's value or exception.

Either the value or the exception supplied to the action will be null.

Parameters

action - BiConsumer<in T, in Throwable!>!: The action to execute.

Return
AsyncResult<T>!: A new result.