Use compare_exchange_weak in limit::Limit::check

This commit is contained in:
Maybe Waffle 2022-01-28 18:19:35 +03:00
parent 4aadabc735
commit 78a3cefc45

View file

@ -45,7 +45,7 @@ impl Limit {
} }
if self if self
.max .max
.compare_exchange(old_max, other, Ordering::Relaxed, Ordering::Relaxed) .compare_exchange_weak(old_max, other, Ordering::Relaxed, Ordering::Relaxed)
.is_ok() .is_ok()
{ {
eprintln!("new max: {}", other); eprintln!("new max: {}", other);