@@ -530,24 +530,19 @@ sealed interface DurableFuture<T> {
530530 * Like [kotlinx.coroutines.awaitAll], but for [DurableFuture].
531531 *
532532 * ```
533- * val ctx = restateContext()
534- * val a1 = ctx.callAsync(GreeterGrpcKt.greetMethod, greetingRequest { name = "Francesco" })
535- * val a2 = ctx.callAsync(GreeterGrpcKt.greetMethod, greetingRequest { name = "Till" })
533+ * val a1 = ctx.awakeable<String>()
534+ * val a2 = ctx.awakeable<String>()
536535 *
537536 * val result = listOf(a1, a2)
538537 * .awaitAll()
539- * .joinToString(separator = "-", transform = GreetingResponse::getMessage )
538+ * .joinToString(separator = "-")
540539 * ```
541540 */
542541suspend fun <T > Collection<DurableFuture<T>>.awaitAll (): List <T > {
543542 return awaitAll(* toTypedArray())
544543}
545544
546- /* *
547- * Like [kotlinx.coroutines.awaitAll], but for [DurableFuture].
548- *
549- * ```
550- */
545+ /* * @see Collection.awaitAll */
551546suspend fun <T > awaitAll (vararg durableFutures : DurableFuture <T >): List <T > {
552547 if (durableFutures.isEmpty()) {
553548 return emptyList()
@@ -563,9 +558,9 @@ suspend fun <T> awaitAll(vararg durableFutures: DurableFuture<T>): List<T> {
563558 * Like [kotlinx.coroutines.selects.select], but for [DurableFuture]
564559 *
565560 * ```
566- * val ctx = restateContext()
567- * val callFuture = ctx.callAsync(GreeterGrpcKt.greetMethod, greetingRequest { name = "Francesco" })
561+ * val callFuture = ctx.awakeable()
568562 * val timeout = ctx.timer(10.seconds)
563+ *
569564 * val result = select {
570565 * callFuture.onAwait { it.message }
571566 * timeout.onAwait { throw TimeoutException() }
0 commit comments