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

Viktor Klang vklang at openjdk.org
Thu Jan 8 16:13:03 UTC 2026


On Thu, 8 Jan 2026 15:18:00 GMT, Doug Lea <dl at openjdk.org> wrote:

>> Changes signal filtering to avoid possible starvation
>
> Doug Lea has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Change signalWork fencing; in-progress activation changes

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

> 1266:          * Resizes the queue array and pushes unless out of memory.
> 1267:          * @param task the task; caller must ensure nonnull
> 1268:          * @param pool the pool to signal upon resize

@DougLea So this param now becomes "the pool to signal upon resize, if null and the queue's owner has a pool then that pool will be used for the signal instead"

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

> 1293:                     ForkJoinWorkerThread o;
> 1294:                     if (pool != null ||
> 1295:                         ((o = owner) != null && (pool = o.pool) != null))

Ok, so now you can't intentionally skip a signal by passing `null` as a pool. Might be for the best, since we always want to signal if we deem it to be needed.

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

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


More information about the core-libs-dev mailing list