await

suspend fun <T : Any> Flux<T>.await(): List<T>

Suspends the current coroutine, and returns all elements emitted by the Flux in a List.


@JvmName(name = "awaitVoid")
suspend fun Flux<Void>.await()

Suspends the current coroutine, and returns when the Flux completes.


suspend fun <T : Any> Mono<T>.await(): T

Awaits for the single value from the given Mono, suspending the current coroutine and resuming when the mono emits the resulting value or throws the corresponding exception if this publisher had produced error.

This suspending function is cancellable. If the Job of the current coroutine is cancelled or completed while this suspending function is waiting, this function immediately resumes with CancellationException.

Throws

if mono does not emit any value


@JvmName(name = "awaitVoid")
suspend fun Mono<Void>.await()

Awaits for the completion signal from the given Mono, suspending the current coroutine and resuming when the mono emits the resulting value or throws the corresponding exception if this publisher had produced error.

This suspending function is cancellable. If the Job of the current coroutine is cancelled or completed while this suspending function is waiting, this function immediately resumes with CancellationException.