RFR: 8301136: Improve unlink() and unlink_all() of ResourceHashtableBase [v2]
Xin Liu
xliu at openjdk.org
Fri Jan 27 23:20:18 UTC 2023
On Thu, 26 Jan 2023 20:51:36 GMT, Ioi Lam <iklam at openjdk.org> wrote:
>> hi, Lam
>> Are you suggesting to use lambda+iterate() to implement unlink_all()? If we use `bucket` and `node` captured by the lambda, I think it's possible. However, I think the resultant code is much less readable. Is it worth it?
>>
>> thanks,
>> --lx
>
> I mean we should implement a basic version of unlink() like this
>
>
> template<typename Function>
> void unlink(Function function) const { ... }
>
>
> Then `unlink_all` and `template<class ITER> void unlink(ITER* iter)` can call into the above template.
hi, @iklam @coleenp,
I added `unlink(Function f)` per your request. Could you take a look?
-------------
PR: https://git.openjdk.org/jdk/pull/12213
More information about the hotspot-dev
mailing list