File tree 3 files changed +9
-8
lines changed
binary-compatibility-validator/reference-public-api
kotlinx-coroutines-core/common/src
3 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -1080,10 +1080,6 @@ public final class kotlinx/coroutines/selects/SelectKt {
1080
1080
public static final fun select (Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
1081
1081
}
1082
1082
1083
- public synthetic class kotlinx/coroutines/selects/SelectKtSelectOpSequenceNumberRefVolatile {
1084
- public fun <init> (J)V
1085
- }
1086
-
1087
1083
public final class kotlinx/coroutines/selects/SelectUnbiasedKt {
1088
1084
public static final fun selectUnbiased (Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
1089
1085
}
Original file line number Diff line number Diff line change @@ -103,8 +103,6 @@ public abstract class AtomicDesc {
103
103
lateinit var atomicOp: AtomicOp <* > // the reference to parent atomicOp, init when AtomicOp is created
104
104
abstract fun prepare (op : AtomicOp <* >): Any? // returns `null` if prepared successfully
105
105
abstract fun complete (op : AtomicOp <* >, failure : Any? ) // decision = = null if success
106
-
107
- override fun toString (): String = " $classSimpleName @$hexAddress (atomicOp=$atomicOp )" // for debug
108
106
}
109
107
110
108
/* *
Original file line number Diff line number Diff line change @@ -205,7 +205,14 @@ private val UNDECIDED: Any = Symbol("UNDECIDED")
205
205
private val RESUMED : Any = Symbol (" RESUMED" )
206
206
207
207
// Global counter of all atomic select operations for their deadlock resolution
208
- private val selectOpSequenceNumber = atomic(1L )
208
+ // The separate internal class is work-around for Atomicfu's current implementation that creates public classes
209
+ // for static atomics
210
+ internal class SeqNumber {
211
+ private val number = atomic(1L )
212
+ fun next () = number.incrementAndGet()
213
+ }
214
+
215
+ private val selectOpSequenceNumber = SeqNumber ()
209
216
210
217
@PublishedApi
211
218
internal class SelectBuilderImpl <in R >(
@@ -541,7 +548,7 @@ internal class SelectBuilderImpl<in R>(
541
548
@JvmField val desc : AtomicDesc
542
549
) : AtomicOp<Any?>() {
543
550
// all select operations are totally ordered by their creating time using selectOpSequenceNumber
544
- override val opSequence = selectOpSequenceNumber.getAndIncrement ()
551
+ override val opSequence = selectOpSequenceNumber.next ()
545
552
546
553
init {
547
554
desc.atomicOp = this
You can’t perform that action at this time.
0 commit comments