Rollup merge of #32745 - Amanieu:arc_fix, r=alexcrichton
Fix infinite loop in Arc::downgrade
This commit is contained in:
commit
ffd1450c27
1 changed files with 1 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue