aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/base/src/main/kotlin/generation/SingleModuleGeneration.kt7
1 files changed, 2 insertions, 5 deletions
diff --git a/plugins/base/src/main/kotlin/generation/SingleModuleGeneration.kt b/plugins/base/src/main/kotlin/generation/SingleModuleGeneration.kt
index 0ae6c265..8ea109b9 100644
--- a/plugins/base/src/main/kotlin/generation/SingleModuleGeneration.kt
+++ b/plugins/base/src/main/kotlin/generation/SingleModuleGeneration.kt
@@ -4,10 +4,7 @@
package org.jetbrains.dokka.base.generation
-import kotlinx.coroutines.DelicateCoroutinesApi
-import kotlinx.coroutines.Dispatchers
-import kotlinx.coroutines.newSingleThreadContext
-import kotlinx.coroutines.runBlocking
+import kotlinx.coroutines.*
import org.jetbrains.dokka.CoreExtensions
import org.jetbrains.dokka.DokkaConfiguration
import org.jetbrains.dokka.DokkaException
@@ -66,7 +63,7 @@ public class SingleModuleGeneration(private val context: DokkaContext) : Generat
/**
* Implementation note: it runs in a separated single thread due to existing support of coroutines (see #2936)
*/
- @OptIn(DelicateCoroutinesApi::class)
+ @OptIn(DelicateCoroutinesApi::class, ExperimentalCoroutinesApi::class)
public fun createDocumentationModels(): List<DModule> = newSingleThreadContext("Generating documentable model").use { coroutineContext -> // see https://github.com/Kotlin/dokka/issues/3151
runBlocking(coroutineContext) {
context.configuration.sourceSets.parallelMap { sourceSet -> translateSources(sourceSet, context) }.flatten()