On Fri, 3 Jul 2026 15:43:33 GMT, Doug Lea <[email protected]> wrote:

>> Changes signal filtering to avoid possible starvation
>
> Doug Lea has updated the pull request with a new target base due to a merge 
> or a rebase. The pull request now contains 144 commits:
> 
>  - Merge branch 'openjdk:master' into JDK-8373118
>  - undo manual padding; filter signals on propagate
>  - manual padding
>  - Strengthen some orderings
>  - weaken an ordering for internal push; randomize lazySubmit
>  - Merge branch 'openjdk:master' into JDK-8373118
>  - Better version of previous commit
>  - another set of activation tradeoffs
>  - More factoring/control experiments
>  - Merge branch 'openjdk:master' into JDK-8373118
>  - ... and 134 more: https://git.openjdk.org/jdk/compare/79be204a...fc3f9261

src/java.base/share/classes/java/util/concurrent/ForkJoinPool.java line 1939:

> 1937:                     nc = ((c + TC_UNIT) & TC_MASK) | ((c + RC_UNIT) & 
> RC_MASK);
> 1938:                 }
> 1939:                 else if ((v = w) == null)

@DougLea No need to assign `v` here, since if this is null the loop exits and 
the value of `v` is never used, and if it isn't null, then it gets assigned in 
the `else`-clause.

src/java.base/share/classes/java/util/concurrent/ForkJoinPool.java line 2128:

> 2126:     private int tryReactivate(WorkQueue w, int phase, int qid, int r) {
> 2127:         WorkQueue[] qs; WorkQueue q, v; ForkJoinTask<?>[] a;
> 2128:         int n, sp, m, spins; long c;

@DougLea `spins` is never used. Dead code or missing code?

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/28797#discussion_r3523950240
PR Review Comment: https://git.openjdk.org/jdk/pull/28797#discussion_r3523950988

Reply via email to