parallelMapNotNull

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

Maps every element of this collection using mapper in parallel and filters out null.

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