RFR: 8320318: ObjectMonitor Responsible thread [v3]
Fredrik Bredberg
fbredberg at openjdk.org
Wed Sep 25 14:18:55 UTC 2024
On Thu, 19 Sep 2024 19:43:46 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
>> Maybe `check_already_owned`? FTR I prefer this version than a friend declaration. Using it outside would also imply renaming it as try_lock to be consistent. And having to expose and check for TryLockResult is also uglier in my opinion than checking a boolean. I don't see it as a hack, we are just skipping the already owned case since we know in this case it will fail. I would actually remove that comment altogether.
>
> I like "check_for_recusion" as a parameter name and also agree that dropping the comment, or rewriting the comment as:
>
> // If called from SharedRuntime::monitor_exit_helper, we know that this thread doesn't already own the lock
>
> I agree that I don't want TryLock and its results exposed outside this file.
fixed
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/19454#discussion_r1775313293
More information about the hotspot-dev
mailing list