Rollup merge of #32745 - Amanieu:arc_fix, r=alexcrichton
Fix infinite loop in Arc::downgrade
This commit is contained in:
commit
ffd1450c27
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user