tuweni / org.apache.tuweni.concurrent / AsyncCompletion / runOnContext

runOnContext

open static fun runOnContext(vertx: Vertx, fn: Supplier<out AsyncCompletion>): AsyncCompletion (source)

Returns a completion that, after the given function executes on a vertx context and returns a completion, completes when the completion from the function does.

Parameters

vertx - The vertx context.

fn - The function returning a completion.

Return
A completion.

open static fun runOnContext(vertx: Vertx, action: Runnable): AsyncCompletion (source)

Returns a completion that completes after the given action executes on a vertx context.

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

Parameters

vertx - The vertx context.

action - The action to execute.

Return
A completion.