tuweni / org.apache.tuweni.concurrent / AsyncResult / runOnContext

runOnContext

open static fun <T : Any!> runOnContext(vertx: Vertx!, fn: Supplier<out AsyncResult<T>!>!): AsyncResult<T>! (source)

Returns a result that, after the given function executes on a vertx context and returns a result, completes when the returned result completes, with the same value or exception.

Note that the given function is run directly on the context and should not block.

Parameters

vertx - Vertx!: The vertx context.

fn - Supplier<out AsyncResult<T>!>!: The function returning a result.

- The type of the returned result's value.

Return
AsyncResult<T>!: A new result.