FreezableAtomicReference

class FreezableAtomicReference<T>(var value: T)(source)

Deprecated (with error)

Use kotlin.concurrent.AtomicReference instead.

Replace with

kotlin.concurrent.AtomicReference

This class was useful only with legacy memory manager. Please use AtomicReference instead.

Since Kotlin

1.3

Constructors

Link copied to clipboard
constructor(value: T)

Properties

Link copied to clipboard
Since Kotlin 1.3

Functions

Link copied to clipboard
fun compareAndSet(expected: T, newValue: T): Boolean

Atomically sets the value to the given new value if the current value equals the expected value and returns true if operation was successful.

Since Kotlin 1.3
Link copied to clipboard
fun compareAndSwap(expected: T, newValue: T): T

Atomically sets the value to the given new value if the current value equals the expected value and returns the old value in any case.

Since Kotlin 1.3
Link copied to clipboard
open override fun toString(): String

Returns the string representation of this object.

Since Kotlin 1.3