On Wed, 5 Aug 2026 10:04:21 GMT, Viktor Klang <[email protected]> wrote:

>> Per Minborg has updated the pull request with a new target base due to a 
>> merge or a rebase. The incremental webrev excludes the unrelated changes 
>> brought in by the merge/rebase. The pull request contains six additional 
>> commits since the last revision:
>> 
>>  - Clarify rational for  memory semantics
>>  - Merge branch 'master' into bug-race-in-mutexes
>>  - Fix comment
>>  - Improve comments
>>  - Add comments and add explicit semantics
>>  - Rework how Mutexes works
>
> src/java.base/share/classes/java/util/LazyCollections.java line 621:
> 
>> 619:             // Defensively snapshot the volatile field and check for 
>> null as we are
>> 620:             // using Unsafe directly.
>> 621:             final Object[] mutexes = 
>> Objects.requireNonNull(this.mutexes, "Should not reach here");
> 
> Does this mean that there's a precondition such that when this method is 
> called that UNSAFE.getIntVolatile(this, COUNTER_OFFSET) > 0?

This method is only called when the `acquireMutex` method returned a non‑`null` 
non‑`TOMB_STONE` value.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/32070#discussion_r3720008121

Reply via email to