On Tue, 2 Dec 2025 09:28:03 GMT, Per Minborg <[email protected]> wrote:
>> Chen Liang has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Tweak VH usage in some classes
>
> src/java.base/share/classes/java/lang/invoke/VarHandle.java line 2036:
>
>> 2034: var constant = MethodHandleImpl.isCompileConstant(vh);
>> 2035: var cache = adaptedMh;
>> 2036: if (constant == MethodHandleImpl.CONSTANT_YES && cache !=
>> null) {
>
> Rookie question: Is there multi-thread considerations here? How about
> visibility across threads?
MethodHandle is immutable and can be safely published. So this is ok.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28585#discussion_r2582166754