Skip to content

Commit

Permalink
Backport 60cbf2925024b1c2253256688ae41741fff0a860
Browse files Browse the repository at this point in the history
  • Loading branch information
neethu-prasad committed Jun 13, 2024
1 parent ccfae88 commit 4c0c1e4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1127,13 +1127,18 @@ public ConditionObject() { }
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;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1506,13 +1506,18 @@ public ConditionObject() { }
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;
}
}
Expand Down

0 comments on commit 4c0c1e4

Please sign in to comment.