RFR: 8343394: Make MemorySessionImpl.state a stable field [v2]

Maurizio Cimadamore mcimadamore at openjdk.org
Thu Oct 31 19:14:32 UTC 2024


On Thu, 31 Oct 2024 18:06:22 GMT, Quan Anh Mai <qamai at openjdk.org> wrote:

>> src/java.base/share/classes/jdk/internal/foreign/ConfinedSession.java line 44:
>> 
>>> 42:     private int asyncReleaseCount = 0;
>>> 43: 
>>> 44:     static final VarHandle ASYNC_RELEASE_COUNT= MhUtil.findVarHandle(MethodHandles.lookup(), "asyncReleaseCount", int.class);
>> 
>> Since you are here, maybe you want to use `MHUtil::findVarHandle` also for the state var handle (for uniformity)
>
> I'm a little confused, I use `MHUtil::findVarHandle` for `acquireCount`, there is no need for a `VarHandle` for `state`.

Apologies, I got confused.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/21810#discussion_r1825049442


More information about the core-libs-dev mailing list