Skip to content

Commit

Permalink
Fix infinite loop in Arc::downgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
Amanieu committed Apr 5, 2016
1 parent f92ce2e commit af047d9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/liballoc/arc.rs
Expand Up @@ -263,6 +263,7 @@ impl<T: ?Sized> Arc<T> {
loop {
// check if the weak counter is currently "locked"; if so, spin.
if cur == usize::MAX {
cur = this.inner().weak.load(Relaxed);
continue;
}

Expand Down

0 comments on commit af047d9

Please sign in to comment.