parallelMap

suspend fun <T, S> Collection<T>.parallelMap(maxConcurrentRequests: Int? = null, mapper: suspend (T) -> S): List<S>

Maps every element of this collection using mapper in parallel.

Parameters

maxConcurrentRequests

the maximum amount of concurrent coroutines (null means unlimited)

This in itself does not launch multiple threads, how many threads are launched is dependent on the used Dispatcher