»
compare_and_swap
concur.atomic.compare_and_swap
(expected concur.atomic.T, new_value concur.atomic.T)
=>
concur.atomic.T[Contains abstract features]
¶0.094dev (2025-06-18 15:08:51 GIT hash 89cffc23ae669b0898a5564fefbf793fcb8e5ca7 built by fridi@fzen)
`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.