RFR: 8366671: Refactor Thread::SpinAcquire and Thread::SpinRelease [v6]
Patricio Chilano Mateo
pchilanomate at openjdk.org
Tue Nov 18 14:56:51 UTC 2025
On Tue, 18 Nov 2025 14:52:55 GMT, Patricio Chilano Mateo <pchilanomate at openjdk.org> wrote:
>> I think we agree about SpinSingleSection that it's sort of overkill we shouldn't add it.
>
> +1 on leaving the code as it was. This makes it harder to read IMO. Also as David points out there is no spinning here so using a SpinSingleSection class would add extra confusion.
>This seems like try-lock usage, though I'm not at all sure why (i.e. if we don't get the lock who is taking care of making a strong reference?)
>
This lock is only used here, so if the try-lock fails somebody else already grabbed it and that thread will create the strong reference (if not created already).
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28264#discussion_r2538514233
More information about the hotspot-dev
mailing list