RFR: 8351996: Behavioral updates for ClassValue::remove [v5]
Viktor Klang
vklang at openjdk.org
Sat Mar 29 17:43:16 UTC 2025
On Fri, 28 Mar 2025 23:39:30 GMT, Chen Liang <liach at openjdk.org> wrote:
>> Chen Liang has updated the pull request incrementally with one additional commit since the last revision:
>>
>> docs
>
> There shouldn't be.
>
> 1. This just allocates a new promise for a single-threaded computation; the promise just holds a field unless there is racy computeValue, which is rare. Also, most of the access to ClassValue is going to find a present entry, so the computation is rare and the impact may be even smaller.
> 2. The Promise objects are always removed by the finally block in `getFromHashMap`, so there should not be retained memory.
Thanks for the clarifications, @liach 👍
-------------
PR Comment: https://git.openjdk.org/jdk/pull/24043#issuecomment-2763869787
More information about the core-libs-dev
mailing list