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

Doug Lea dl at openjdk.org
Thu Jan 8 16:32:15 UTC 2026


On Wed, 7 Jan 2026 15:07:41 GMT, Viktor Klang <vklang at openjdk.org> wrote:

>> src/java.base/share/classes/java/util/concurrent/ForkJoinPool.java line 1969:
>> 
>>> 1967:                             }
>>> 1968:                             else if (q.base == b &&
>>> 1969:                                      U.compareAndSetReference(a, bp, t, null)) {
>> 
>> Would we expect a[bp] to be possible to be something besides `t` or `null` here? If not, I think we could switch to a `U.getAndSetReference(a, bp, null) == t` here?
>
> Narrator: it won't work since there might be other values than `t` and `null`

Right. I once tried to use anyway and cope with unexpected but the overhead for doing it not worth it.

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

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


More information about the core-libs-dev mailing list