On Wed, 7 Jan 2026 15:07:41 GMT, Viktor Klang <[email protected]> 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