Fix infinite loop in Arc::downgrade

This commit is contained in:
Amanieu d'Antras 2016-04-05 14:00:17 +01:00
parent f92ce2e9fe
commit af047d9c10

View File

@ -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;
}