suspendAwait

suspend fun <T> Future<T>.suspendAwait(): T

Suspend until the future completion. Resumes with the same exception if the future completes exceptionally

suspend fun <T> Future<T>.suspendAwait(
    exception: (Throwable, <ERROR CLASS><T>) -> Unit
): T

Suspend until the future completion handling exception from the future using exception function