RFR: 8373118: Test java/lang/Thread/virtual/Starvation.java timed out [v21]
Viktor Klang
vklang at openjdk.org
Thu Jan 8 16:50:28 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 1830:
> 1828: */
> 1829: final void signalWork(WorkQueue q, int qbase) {
> 1830: int pc = U.getIntAcquire(this, PARALLELISM);
I like this, as this has the nice benefit of seeing potential changes to `parallelism` sooner.
src/java.base/share/classes/java/util/concurrent/ForkJoinPool.java line 1855:
> 1853: break;
> 1854: if (c == (c = ctl) &&
> 1855: c == (c = U.compareAndExchangeLong(this, CTL, c, nc))) {
Are there any measurable differences between the above and `c == (c = ctl) && U.compareAndSetLong(this, CTL, c, nc)` or `c == U.compareAndExchangeLong(this, CTL, c, nc)`? 🤔
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28797#discussion_r2673104063
PR Review Comment: https://git.openjdk.org/jdk/pull/28797#discussion_r2673100883
More information about the core-libs-dev
mailing list