Android 12 Developer Preview is here! Try it out, and give us your feedback!

AtomicReference

expect class AtomicReference<V>
kotlin.Any
   ↳ androidx.compose.runtime.AtomicReference

Summary

Public constructors
<init>(value: V)

Public methods
Boolean
compareAndSet(expect: V, newValue: V)

V
get()

V
getAndSet(value: V)

Unit
set(value: V)

Public constructors

<init>

AtomicReference(value: V)

Public methods

compareAndSet

fun compareAndSet(
    expect: V,
    newValue: V
): Boolean

get

fun get(): V

getAndSet

fun getAndSet(value: V): V

set

fun set(value: V): Unit