On Thu, 31 Oct 2024 18:06:22 GMT, Quan Anh Mai <qa...@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