RFR: JDK-8310913 Move ReferencedKeyMap to jdk.internal so it may be shared [v2]

Jim Laskey jlaskey at openjdk.org
Tue Jul 4 12:38:55 UTC 2023


On Fri, 30 Jun 2023 17:48:35 GMT, Mandy Chung <mchung at openjdk.org> wrote:

>> Jim Laskey has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Remove warning tied to String Templates
>
> MethodType's `ConcurrentWeakInternSet` uses `NativeReferenceQueue` which uses native monitors (that was added for virtual threads).   This change uses the reference queue using j.u.c locks.   Has you confirmed that this is not an issue?     Or `ReferencedKeySet` can take a parameter to specify using the native reference queue?
> 
> In `ReferencedKey::equals` method, can use `Reference::refersTo` instead of `Objects.equals`.

@mlchung I missed the use of newNativeReferenceQueue. This change has been sitting in my queue for a few years, I will adapt to the new reality. Thank you for pointing it out.

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

PR Comment: https://git.openjdk.org/jdk/pull/14684#issuecomment-1620171192


More information about the core-libs-dev mailing list