parallelOps

suspend fun <R> parallelOps(vararg operations: suspend () -> R): List<R>

Execute multiple suspend operations in parallel and wait for all to complete.

All operations are launched concurrently using structured concurrency. If any operation fails, all other operations are cancelled.

Return

List of results from all operations in the order they were provided

Parameters

operations

Variable number of suspend functions to execute in parallel

Throws

if any operation fails