Fix infinite loop in Arc::downgrade
This commit is contained in:
parent
f92ce2e9fe
commit
af047d9c10
@ -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…
x
Reference in New Issue
Block a user