RFR: 8373118: Test java/lang/Thread/virtual/Starvation.java timed out [v22]

Viktor Klang vklang at openjdk.org
Fri Jan 9 14:36:59 UTC 2026


On Thu, 8 Jan 2026 18:52:32 GMT, Doug Lea <dl at openjdk.org> 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 2281:

> 2279:                                 if (U.compareAndSetReference(a, k, t, null)) {
> 2280:                                     q.base = b + 1;
> 2281:                                     U.putIntVolatile(w, WorkQueue.SOURCE, j);

@DougLea Since WorkQueue::base is volatile with this PR, it _might_ be worth performing a plain or opaque write to q.base followed by the volatile write to WorkQueue.SOURCE? 🤔

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

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


More information about the core-libs-dev mailing list