Skip to content

Commit

Permalink
don't be an idiot and use the strongest ordering just because you can
Browse files Browse the repository at this point in the history
  • Loading branch information
Internal-Compiler-Error committed Aug 25, 2023
1 parent d4d519c commit 392030f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/counter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ impl Counter {
}

pub fn get_val(&self) -> usize {
self.0.load(Ordering::SeqCst)
self.0.load(Ordering::Relaxed)
}

pub fn increment(&self) {
self.0.fetch_add(1, Ordering::SeqCst);
self.0.fetch_add(1, Ordering::Relaxed);
}
}

0 comments on commit 392030f

Please sign in to comment.