Searched refs:AtomicRef (Results 1 – 11 of 11) sorted by relevance
/external/kotlinx.atomicfu/atomicfu/src/commonTest/kotlin/kotlinx/atomicfu/test/ |
D | UncheckedCastTest.kt | 3 import kotlinx.atomicfu.AtomicRef 21 assertEquals((s as AtomicRef<String>).value, "AAA") in testAtomicValUncheckedCast() 23 assertEquals((bs as AtomicRef<Map<Int, List<Box>>>).value[1]!![0].b * 10, 10) in testAtomicValUncheckedCast() 29 assertEquals((topLevelS as AtomicRef<List<String>>).value[1], "B") in testTopLevelValUnchekedCast() 35 assertEquals((topLevelSS as AtomicRef<List<Array<String>>>).value[0][1], "B") in testTopLevelValUnchekedCastNested() 41 private inline fun <T> AtomicRef<T>.getString(): String = in getString() 42 (this as AtomicRef<String>).value in getString() 55 assertEquals("OK", (a[0] as AtomicRef<String>).value) in testArrayValueUncheckedCast()
|
D | InlineCASTest.kt | 18 … private inline fun AtomicRef<List<String>>.casLoop(to: List<String>): List<String> = loop { cur -> in <lambda>()
|
/external/kotlinx.atomicfu/atomicfu/src/commonMain/kotlin/kotlinx/atomicfu/ |
D | AtomicFU.common.kt | 18 public expect fun <T> atomic(initial: T): AtomicRef<T> in atomic() 66 public expect class AtomicRef<T> { in atomic() class 91 public inline fun <T> AtomicRef<T>.loop(action: (T) -> Unit): Nothing { in loop() 100 public inline fun <T> AtomicRef<T>.update(function: (T) -> T) { in update() 111 public inline fun <T> AtomicRef<T>.getAndUpdate(function: (T) -> T): T { in getAndUpdate() 122 public inline fun <T> AtomicRef<T>.updateAndGet(function: (T) -> T): T { in updateAndGet() 472 public operator fun get(index: Int): AtomicRef<T?> = array[index] in get()
|
/external/kotlinx.atomicfu/atomicfu/src/jvmMain/kotlin/kotlinx/atomicfu/ |
D | Interceptor.kt | 30 open fun <T> beforeUpdate(ref: AtomicRef<T>) {} in beforeUpdate() 34 open fun <T> afterSet(ref: AtomicRef<T>, newValue: T) {} in afterSet() 38 open fun <T> afterRMW(ref: AtomicRef<T>, oldValue: T, newValue: T) {} in afterRMW()
|
D | AtomicFU.kt | 23 public actual fun <T> atomic(initial: T): AtomicRef<T> = AtomicRef<T>(initial) in atomic() 66 public actual class AtomicRef<T> internal constructor(value: T) { in atomic() class 110 …private val FU = AtomicReferenceFieldUpdater.newUpdater(AtomicRef::class.java, Any::class.java, "v… in atomic()
|
D | LockFreedomTestEnvironment.kt | 459 override fun <T> beforeUpdate(ref: AtomicRef<T>) = step() in <lambda>() 462 override fun <T> afterSet(ref: AtomicRef<T>, newValue: T) = step() in <lambda>() 465 override fun <T> afterRMW(ref: AtomicRef<T>, oldValue: T, newValue: T) = step() in <lambda>()
|
/external/kotlinx.atomicfu/atomicfu/src/jsMain/kotlin/kotlinx/atomicfu/ |
D | AtomicFU.kt | 10 public actual fun <T> atomic(initial: T): AtomicRef<T> = AtomicRef<T>(initial) in atomic() 23 public actual class AtomicRef<T> internal constructor(value: T) { in atomic() class
|
/external/kotlinx.atomicfu/atomicfu/src/nativeMain/kotlin/kotlinx/atomicfu/ |
D | AtomicFU.kt | 15 public actual fun <T> atomic(initial: T): AtomicRef<T> = AtomicRef<T>(KAtomicRef(initial)) in atomic() 23 public actual inline class AtomicRef<T> internal constructor(@PublishedApi internal val a: KAtomicR… in atomic() class
|
/external/kotlinx.coroutines/kotlinx-coroutines-core/jvm/test/internal/ |
D | SegmentBasedQueue.kt | 21 private val head: AtomicRef<OneElementSegment<T>> 22 private val tail: AtomicRef<OneElementSegment<T>>
|
/external/kotlinx.coroutines/kotlinx-coroutines-core/common/src/internal/ |
D | ConcurrentLinkedList.kt | 44 private inline fun <S : Segment<S>> AtomicRef<S>.moveForward(to: S): Boolean = loop { cur -> in cur() 65 internal inline fun <S : Segment<S>> AtomicRef<S>.findSegmentAndMoveForward( in findSegmentAndMoveForward()
|
/external/kotlinx.coroutines/kotlinx-coroutines-core/common/src/sync/ |
D | Semaphore.kt | 129 private val head: AtomicRef<SemaphoreSegment> 131 private val tail: AtomicRef<SemaphoreSegment>
|