nomicon
nomicon copied to clipboard
example uses deprecated `compare_and_swap`
This page says:
while lock.compare_and_swap(false, true, Ordering::Acquire) { }
The problem:
pub fn compare_and_swap (&self, current: bool, new: bool, order: Ordering) -> [bool]
is deprecated.
Request: update the example to make it applicable for latest version of Rust