tuweni / org.apache.tuweni.concurrent / AsyncCompletion / thenConsume


abstract fun <U : Any!> thenConsume(other: AsyncResult<out U>!, consumer: Consumer<in U>!): AsyncCompletion! (source)

Returns a completion that, when this completion and the supplied result both complete normally, completes after executing the supplied function with the value from the supplied result as an argument.


other - AsyncResult<out U>!: The other result.

consumer - Consumer<in U>!: The function to execute.

- The type of the other's value.

AsyncCompletion!: A new result.