Merge #11367
11367: minor: Use `compare_exchange_weak` in `limit::Limit::check` r=lnicola a=WaffleLapkin Not a big deal, but generally loops should use `_weak` version of `compare_exchange`. Co-authored-by: Maybe Waffle <waffle.lapkin@gmail.com>
This commit is contained in:
commit
6634eaf13a
@ -45,7 +45,7 @@ pub fn check(&self, other: usize) -> Result<(), ()> {
|
||||
}
|
||||
if self
|
||||
.max
|
||||
.compare_exchange(old_max, other, Ordering::Relaxed, Ordering::Relaxed)
|
||||
.compare_exchange_weak(old_max, other, Ordering::Relaxed, Ordering::Relaxed)
|
||||
.is_ok()
|
||||
{
|
||||
eprintln!("new max: {}", other);
|
||||
|
Loading…
Reference in New Issue
Block a user