Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 6634eaf

Browse files
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 <[email protected]>
2 parents 4aadabc + 78a3cef commit 6634eaf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/limit/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ impl Limit {
4545
}
4646
if self
4747
.max
48-
.compare_exchange(old_max, other, Ordering::Relaxed, Ordering::Relaxed)
48+
.compare_exchange_weak(old_max, other, Ordering::Relaxed, Ordering::Relaxed)
4949
.is_ok()
5050
{
5151
eprintln!("new max: {}", other);

0 commit comments

Comments
 (0)