compare And Set Volatile Slot
fun compareAndSetVolatileSlot( field: ObjectSlotsEnum, reference: A_BasicObject, newValue: A_BasicObject): Boolean
Content copied to clipboard
Perform an atomic compare-and-set on a slot of the given array. If the value in the slot is the same Kotlin object (under ===) as the reference, replace it with the newValue and answer true. Otherwise answer false.
Return
The previous value from the specified slot.
Parameters
field
An enumeration value that defines the field ordering.
reference
The object to compare (by identity) against the current slot value.
new Value
The object to store at the specified slot.