On Sun, 25 Jan 2026 20:09:13 GMT, Doug Lea <[email protected]> wrote:
>> Changes signal filtering to avoid possible starvation
>
> Doug Lea has updated the pull request incrementally with one additional
> commit since the last revision:
>
> Don't oversignal LIFO
src/java.base/share/classes/java/util/concurrent/ForkJoinPool.java line 1787:
> 1785: (phase = w.phase) != 0 && (phase & IDLE) != 0)
> 1786: releaseWaiters(); // ensure released
> 1787: if (w == null || w.source != DROPPED) {
@DougLea Do we need a volatile read of `source` here, or would a weaker access
read be sufficient? (since w.phase is already volatile-y read prior to this
read)
src/java.base/share/classes/java/util/concurrent/ForkJoinPool.java line 2247:
> 2245: int s = 0;
> 2246: if (task != null && (s = task.status) >= 0 && internal && w !=
> null) {
> 2247: int wid = w.phase & SMASK, r = wid + 2, wsrc = w.source;
@DougLea Same comment here w.r.t. the w.source access
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28797#discussion_r2727970871
PR Review Comment: https://git.openjdk.org/jdk/pull/28797#discussion_r2727978715