par Sequence Result
suspend fun <A> Iterable<suspend CoroutineScope.() -> Result<A>>.
Deprecated
Prefer composing parMap with result DSL
Replace with
import arrow.fx.coroutines.parMap
import arrow.core.continuations.result
Content copied to clipboard
result<List<B>> { this.parMap(ctx) { it().bind() } }Content copied to clipboard
Sequences all tasks in parallel on ctx and returns the result. If one or more of the tasks returns Result.failure then all the Result.failure results will be combined using addSuppressed.
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.
suspend fun <A> Iterable<suspend () -> Result<A>>.parSequenceResult(ctx: CoroutineContext = EmptyCoroutineContext): Result<List<A>>
Deprecated
Prefer composing parMap with result DSL
Replace with
import arrow.fx.coroutines.parMap
import arrow.core.continuations.result
Content copied to clipboard
result<List<B>> { this.parMap(ctx) { it().bind() } }Content copied to clipboard