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
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-07-10 15:41:47 GIT hash eafa42ae743de61b62f958948d7abb5fada7756f built by fridi@fzen)