On Wed, 7 Apr 2021 13:57:50 GMT, Robbin Ehn <[email protected]> wrote:
>> src/hotspot/share/runtime/thread.inline.hpp line 207:
>>
>>> 205: }
>>> 206:
>>> 207: inline void JavaThread::set_terminated(TerminatedTypes t) {
>>
>> I prefer set_terminated(arg) over the new set of methods.
>
> We had two methods:
>
> void set_terminated(TerminatedTypes t);
> void set_terminated_value();
>
> Terminated is part of the name of the method, the name of the flag, the name
> of the type and part of the names of two of the states, which is very
> confusing.
>
> Also the setters now match the queries:
> E.g.
> `bool is_exiting()`
>
> The queries do not indicate in any sense that they are queries on the
> terminated flag.
> The state flag is an implementation detail from query POV.
> So to be consistent e.g. "set_exiting()" also hides the fact that we keep
> track of this with a flag.
Please advise :) , I can roll back if you insist!
-------------
PR: https://git.openjdk.java.net/jdk/pull/3191