select
Like kotlinx.coroutines.selects.select, but for DurableFuture
val callFuture = ctx.awakeable()
val timeout = ctx.timer(10.seconds)
val result = select {
callFuture.onAwait { it.message }
timeout.onAwait { throw TimeoutException() }
}.await()
Content copied to clipboard