awaitAll
Like kotlinx.coroutines.awaitAll, but for Awaitable.
Like kotlinx.coroutines.awaitAll, but for Awaitable.
val ctx = restateContext()
val a1 = ctx.callAsync(GreeterGrpcKt.greetMethod, greetingRequest { name = "Francesco" })
val a2 = ctx.callAsync(GreeterGrpcKt.greetMethod, greetingRequest { name = "Till" })
val result = listOf(a1, a2)
.awaitAll()
.joinToString(separator = "-", transform = GreetingResponse::getMessage)
Content copied to clipboard