getAndSet method
Atomically sets the value of the element at the given index
to the newValue and returns the old value of the element.
Implementation
external T getAndSet(Int index, T newValue);
Atomically sets the value of the element at the given index
to the newValue and returns the old value of the element.
external T getAndSet(Int index, T newValue);