From 02f30b142aa467d3a24cc52a1fe3f2fed7ea1e33 Mon Sep 17 00:00:00 2001 From: Ignat Beresnev Date: Thu, 31 Aug 2023 20:16:01 +0200 Subject: Enable explicit API mode (#3139) --- core/src/main/kotlin/utilities/parallelCollectionOperations.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'core/src/main/kotlin/utilities/parallelCollectionOperations.kt') diff --git a/core/src/main/kotlin/utilities/parallelCollectionOperations.kt b/core/src/main/kotlin/utilities/parallelCollectionOperations.kt index 1bb563c9..001fca0b 100644 --- a/core/src/main/kotlin/utilities/parallelCollectionOperations.kt +++ b/core/src/main/kotlin/utilities/parallelCollectionOperations.kt @@ -11,16 +11,16 @@ import kotlinx.coroutines.launch import org.jetbrains.dokka.InternalDokkaApi @InternalDokkaApi -suspend inline fun Iterable.parallelMap(crossinline f: suspend (A) -> B): List = coroutineScope { +public suspend inline fun Iterable.parallelMap(crossinline f: suspend (A) -> B): List = coroutineScope { map { async { f(it) } }.awaitAll() } @InternalDokkaApi -suspend inline fun Iterable.parallelMapNotNull(crossinline f: suspend (A) -> B?): List = coroutineScope { +public suspend inline fun Iterable.parallelMapNotNull(crossinline f: suspend (A) -> B?): List = coroutineScope { map { async { f(it) } }.awaitAll().filterNotNull() } @InternalDokkaApi -suspend inline fun Iterable.parallelForEach(crossinline f: suspend (A) -> Unit): Unit = coroutineScope { +public suspend inline fun Iterable.parallelForEach(crossinline f: suspend (A) -> Unit): Unit = coroutineScope { forEach { launch { f(it) } } } -- cgit