select

inline suspend fun <R> select(crossinline builder: SelectBuilder<R>.() -> Unit): R

Like kotlinx.coroutines.selects.select, but for Awaitable

val ctx = restateContext()
val callAwaitable = ctx.callAsync(GreeterGrpcKt.greetMethod, greetingRequest { name = "Francesco" })
val timeout = ctx.timer(10.seconds)
val result = select {
callAwaitable.onAwait { it.message }
timeout.onAwait { throw TimeoutException() }
}