Atomically sets the value to newValue and returns the old value, with memory effects as specified by VarHandle.getAndSet.
newValue
VarHandle.getAndSet
Parameters:
Returns: the previous value
Diagram: AtomicTypes