Fuzion Logo
fuzion-lang.dev — The Fuzion Language Portal
»

compare_and_swap

concur.atomic.compare_and_swap

(expected concur.atomic.T, new_value concur.atomic.T)
 => 
concur.atomic.T
[Contains abstract features]
Perform a bit-wise comparison of the value contained in this atomic and
`expected`. In case both values are equal, replace this value with `new_value`.

returns the old value, independent of whether the old value is bit-wise
equal to `expected` or not.
0.094dev (2025-06-18 15:08:51 GIT hash 89cffc23ae669b0898a5564fefbf793fcb8e5ca7 built by fridi@fzen)