orangy
async
function can have executor as a parameter, thus it would be like:
val future = async(exec) { // coroutine
…
val value = await(mainThread, someAsyncComputation) // suspends until someAsyncComputation completes and continues on main thread
…
}