RFR: 8305425: Thread.isAlive0 doesn't need to call into the VM [v6]
Alan Bateman
alanb at openjdk.org
Wed Apr 5 07:00:07 UTC 2023
On Wed, 5 Apr 2023 04:37:27 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> src/java.base/share/classes/java/lang/Thread.java line 235:
>>
>>> 233: and reset to zero when the thread terminates. A non-zero value indicates this thread
>>> 234: isAlive().
>>> 235: */
>>
>> Maybe JavaDocify this?
>> Suggestion:
>>
>> /**
>> * Reserved for exclusive use by the JVM. Cannot be moved to the FieldHolder
>> * as it needs to be set by the VM before executing the constructor that
>> * will create the FieldHolder. The historically named {@code eetop} holds
>> * the address of the underlying VM JavaThread, and is set to non-zero when
>> * the thread is started, and reset to zero when the thread terminates.
>> * A non-zero value indicates this thread {@link #isAlive()}.
>> */
>
> Being a private field it won't appear in any javadoc that anyone is ever likely to read. Only developers will see this (or need to see it) when they read the source code.
It's just a bit inconsistent with the other comments, no big deal. I'd probably put an asterisk at the bringing of each time so it's consistent with the other /*..*/ comments on fields in this class.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13287#discussion_r1158096207
More information about the build-dev
mailing list