exchange(_:ordering:)
Atomically sets the current value to desired and returns the original value, applying the specified memory ordering.
Declaration
func exchange(_ desired: consuming Value, ordering: AtomicUpdateOrdering) -> ValueParameters
- desired:
The desired new value.
- ordering:
The memory ordering to apply on this operation.
Return Value
The original value.