On Tue, 20 Oct 2026 07:10:15 GMT, Aleksey Shipilev <[email protected]> wrote:

>> Does it really need CAS? Creating the pool is always done by the VM thread, 
>> so it should be thread safe, right?
>
> Yes, _now_ it is done by a single thread. CAS provides defense in depth for 
> future uses. You can do a CAS and then assert that no conflicts have happened.

This seems extreme to me. An assert that we're in the VMThread would 
future-proof things IMO.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/33218#discussion_r4322792742

Reply via email to