On Sun, 18 Jan 2026 21:07:48 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:
>
> Simplify scan mode control by moving and reworking topLevelExec and
> throwing on trim
src/java.base/share/classes/java/util/concurrent/ForkJoinPool.java line 1271:
> 1269: }
> 1270: if (pred == null && pool != null)
> 1271: pool.signalWork(this, s); // may have appeared empty
@DougLea I presume we don't need to do the getReferenceAcquire if the pool is
null?
If so, then we could do something like:
boolean signal = pool != null && U.getReferenceAcquire(a,
slotOffset(m & (s - 1))) == null;
if (unlock != 1) { // release external lock
U.putInt(this, PHASE, unlock);
U.storeFence();
}
if (signal)
pool.signalWork(this, s); // may have appeared empty
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28797#discussion_r2706064195