8325754: Dead AbstractQueuedSynchronizer$ConditionNodes survive minor garbage collections
Reviewed-by: alanb
This commit is contained in:
parent
da14aa463b
commit
60cbf29250
@ -1127,13 +1127,18 @@ public abstract class AbstractQueuedLongSynchronizer
|
||||
private void doSignal(ConditionNode first, boolean all) {
|
||||
while (first != null) {
|
||||
ConditionNode next = first.nextWaiter;
|
||||
|
||||
if ((firstWaiter = next) == null)
|
||||
lastWaiter = null;
|
||||
else
|
||||
first.nextWaiter = null; // GC assistance
|
||||
|
||||
if ((first.getAndUnsetStatus(COND) & COND) != 0) {
|
||||
enqueue(first);
|
||||
if (!all)
|
||||
break;
|
||||
}
|
||||
|
||||
first = next;
|
||||
}
|
||||
}
|
||||
|
@ -1506,13 +1506,18 @@ public abstract class AbstractQueuedSynchronizer
|
||||
private void doSignal(ConditionNode first, boolean all) {
|
||||
while (first != null) {
|
||||
ConditionNode next = first.nextWaiter;
|
||||
|
||||
if ((firstWaiter = next) == null)
|
||||
lastWaiter = null;
|
||||
else
|
||||
first.nextWaiter = null; // GC assistance
|
||||
|
||||
if ((first.getAndUnsetStatus(COND) & COND) != 0) {
|
||||
enqueue(first);
|
||||
if (!all)
|
||||
break;
|
||||
}
|
||||
|
||||
first = next;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user