Use exchange(newValue: Long) instead.
this.exchange(newValue)
Atomically sets the value to the given new value and returns the old value.
Thanks for your feedback!