diff options
Diffstat (limited to 'kotlinx-coroutines-core/common/src/internal/ConcurrentLinkedList.kt')
-rw-r--r-- | kotlinx-coroutines-core/common/src/internal/ConcurrentLinkedList.kt | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/kotlinx-coroutines-core/common/src/internal/ConcurrentLinkedList.kt b/kotlinx-coroutines-core/common/src/internal/ConcurrentLinkedList.kt index 0e765838..638ec432 100644 --- a/kotlinx-coroutines-core/common/src/internal/ConcurrentLinkedList.kt +++ b/kotlinx-coroutines-core/common/src/internal/ConcurrentLinkedList.kt @@ -6,6 +6,7 @@ package kotlinx.coroutines.internal import kotlinx.atomicfu.* import kotlinx.coroutines.* +import kotlin.jvm.* import kotlin.native.concurrent.SharedImmutable /** @@ -227,8 +228,8 @@ private inline fun AtomicInt.addConditionally(delta: Int, condition: (cur: Int) } } -@Suppress("EXPERIMENTAL_FEATURE_WARNING") // We are using inline class only internally, so it is Ok -internal inline class SegmentOrClosed<S : Segment<S>>(private val value: Any?) { +@JvmInline +internal value class SegmentOrClosed<S : Segment<S>>(private val value: Any?) { val isClosed: Boolean get() = value === CLOSED @Suppress("UNCHECKED_CAST") val segment: S get() = if (value === CLOSED) error("Does not contain segment") else value as S |