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 - Vertx!: The vertx context.

fn - Supplier<out AsyncCompletion!>!: The function returning a completion.

Return
AsyncCompletion!: 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 - Vertx!: The vertx context.

action - Runnable!: The action to execute.

Return
AsyncCompletion!: A completion.