We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b017cca commit 22c5391Copy full SHA for 22c5391
kotlinx-coroutines-core/native/src/DefaultDelay.kt
@@ -98,4 +98,5 @@ private fun defaultDelayRunningUnconfinedLoop(): Nothing {
98
99
/** A view separate from [Dispatchers.IO].
100
* [Int.MAX_VALUE] instead of `1` to avoid needlessly using the [LimitedDispatcher] machinery. */
101
-private val ioView = Dispatchers.IO.limitedParallelism(Int.MAX_VALUE)
+private val ioView by lazy { Dispatchers.IO.limitedParallelism(Int.MAX_VALUE) }
102
+// Without `lazy`, there is a cycle between `ioView` and `DefaultDelay` initialization, leading to a segfault.
0 commit comments