parSequenceN

suspend fun <A> Iterable<suspend () -> A>.parSequenceN(n: Int): List<A>(source)
suspend fun <A> Iterable<suspend () -> A>.parSequenceN(ctx: CoroutineContext = EmptyCoroutineContext, n: Int): List<A>(source)


@JvmName(name = "parSequenceNScoped")
suspend fun <A> Iterable<suspend CoroutineScope.() -> A>.parSequenceN(n: Int): List<A>(source)

Sequences all tasks in n parallel processes on Dispatchers.Default and return the result.

Cancelling this operation cancels all running tasks


@JvmName(name = "parSequenceNScoped")
suspend fun <A> Iterable<suspend CoroutineScope.() -> A>.parSequenceN(ctx: CoroutineContext = EmptyCoroutineContext, n: Int): List<A>(source)

Sequences all tasks in n parallel processes and return the result.

Coroutine context is inherited from a CoroutineScope, additional context elements can be specified with ctx argument. If the combined context does not have any dispatcher nor any other ContinuationInterceptor, then Dispatchers.Default is used. WARNING If the combined context has a single threaded ContinuationInterceptor, this function will not run in parallel.

Cancelling this operation cancels all running tasks