diff --git a/kotlinx-coroutines-core/concurrent/src/MultithreadedDispatchers.common.kt b/kotlinx-coroutines-core/concurrent/src/MultithreadedDispatchers.common.kt index bda8d35028..a05f0a60e8 100644 --- a/kotlinx-coroutines-core/concurrent/src/MultithreadedDispatchers.common.kt +++ b/kotlinx-coroutines-core/concurrent/src/MultithreadedDispatchers.common.kt @@ -59,4 +59,5 @@ public fun newSingleThreadContext(name: String): CloseableCoroutineDispatcher = * @param name the base name of the created threads. */ @ExperimentalCoroutinesApi +@DelicateCoroutinesApi public expect fun newFixedThreadPoolContext(nThreads: Int, name: String): CloseableCoroutineDispatcher diff --git a/kotlinx-coroutines-core/native/src/MultithreadedDispatchers.kt b/kotlinx-coroutines-core/native/src/MultithreadedDispatchers.kt index 283fce0d0b..919430c068 100644 --- a/kotlinx-coroutines-core/native/src/MultithreadedDispatchers.kt +++ b/kotlinx-coroutines-core/native/src/MultithreadedDispatchers.kt @@ -11,6 +11,7 @@ import kotlin.native.concurrent.* import kotlin.time.* import kotlin.time.Duration.Companion.milliseconds +@DelicateCoroutinesApi public actual fun newFixedThreadPoolContext(nThreads: Int, name: String): CloseableCoroutineDispatcher { require(nThreads >= 1) { "Expected at least one thread, but got: $nThreads" } return MultiWorkerDispatcher(name, nThreads)