suspend fun <T> awaitResult(block: (h: Handler<AsyncResult<T>>) -> Unit): T
Run an asynchronous block and awaits the result.
The block is executed with a Handler<AsyncResult<T>> argument that can be completed or failed.
awaitResult returns the value that completed the futureawaitResult throws the exception that failed the futureThis handler can be passed to Vert.x asynchronous method:
val s = awaitResult { handler ->
server.listen(8080, handler)
}
The coroutine will be blocked until the future is completed or failed, this action do not block vertx's eventLoop.