inline suspend fun <T> vx(crossinline callba...
# coroutines
d
inline suspend fun <T> vx(crossinline callback: (Handler<AsyncResult<T>>) -> Unit) = suspendCoroutine<T> { c-> callback(object : Handler<AsyncResult<T>> { override fun handle(event: AsyncResult<T>) { if (event.succeeded()) { c.resume(event.result()) } else { c.resumeWithException(event.cause()) } } }) }