Contents Menu Expand Light mode Dark mode Auto light/dark, in light mode Auto light/dark, in dark mode Skip to content
Slang Documentation
Slang Documentation
Back to top
View this page

Atomic<T>.exchange¶

Description¶

Atomically replace the stored T value with a new T value and return replaced value

Signature¶

T Atomic<T>.exchange(
    T newValue,
    MemoryOrder order)
    where T : IAtomicable;

Parameters¶

newValue : T¶

order : MemoryOrder = MemoryOrder.Relaxed¶

On this page
  • Atomic<T>.exchange
    • Description
    • Signature
    • Parameters
      • newValue : T
      • order : MemoryOrder = MemoryOrder.Relaxed