Rollup merge of #32745 - Amanieu:arc_fix, r=alexcrichton

Fix infinite loop in Arc::downgrade
This commit is contained in:
Manish Goregaokar 2016-04-07 17:17:10 +05:30
commit ffd1450c27

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