On Thu, 8 Jan 2026 18:52:32 GMT, Doug Lea <[email protected]> wrote:
>> Changes signal filtering to avoid possible starvation
>
> Doug Lea has updated the pull request incrementally with two additional
> commits since the last revision:
>
> - Undo unrelated change
> - Re-introduce acquiring array reads; re-arrange to rely on volatile base
> index
src/java.base/share/classes/java/util/concurrent/ForkJoinPool.java line 2326:
> 2324: scan: for (int l = n; l > 0; --l, ++r) {
> 2325: int j; WorkQueue q;
> 2326: if ((q = qs[j = r & SMASK & (n - 1)]) != null) {
@DougLea `j` is never used.
src/java.base/share/classes/java/util/concurrent/ForkJoinPool.java line 2329:
> 2327: for (;;) {
> 2328: ForkJoinTask<?> t; ForkJoinTask<?>[] a;
> 2329: int b, cap, nb; long k;
@DougLea `nb` is never used.
src/java.base/share/classes/java/util/concurrent/ForkJoinPool.java line 3083:
> 3081: static ForkJoinPool asyncCommonPool() {
> 3082: ForkJoinPool cp; int p;
> 3083: if ((p = (cp = common).parallelism) == 0)
@DougLea `p` is never used.
src/java.base/share/classes/java/util/concurrent/ForkJoinPool.java line 3859:
> 3857: * granularities.The returned count does not include scheduled
> 3858: * tasks that are not yet ready to execute, which are reported
> 3859: * separately by method {@link getDelayedTaskCount}.
Suggestion:
* separately by method {@link #getDelayedTaskCount}.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28797#discussion_r2676434850
PR Review Comment: https://git.openjdk.org/jdk/pull/28797#discussion_r2676435633
PR Review Comment: https://git.openjdk.org/jdk/pull/28797#discussion_r2676441709
PR Review Comment: https://git.openjdk.org/jdk/pull/28797#discussion_r2676448152