Skip to content

Commit

Permalink
switches the success ordering to AcqRel
Browse files Browse the repository at this point in the history
see [issue #1](#1) for
further discussion
  • Loading branch information
Jonathan Strong committed Apr 7, 2018
1 parent bd71799 commit c7f284a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ impl AtomicIncr {
loop {
let prev = self.0.load(Ordering::Acquire);
if val > prev {
if let Ok(_) = self.0.compare_exchange(prev, val, Ordering::Acquire, Ordering::Acquire) {
if let Ok(_) = self.0.compare_exchange(prev, val, Ordering::AcqRel, Ordering::Acquire) {
gt = true;
break
}
Expand Down

0 comments on commit c7f284a

Please sign in to comment.