compareAndSwap
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.
Parameters
Return the old value
Try the revamped Kotlin docs design →
Try the revamped Kotlin docs design!
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.
Return the old value