On Tue, 25 Jul 2023 05:50:12 GMT, Alan Bateman <al...@openjdk.org> wrote:

>> src/hotspot/share/classfile/javaClasses.hpp line 536:
>> 
>>> 534: 
>>> 535:     // additional state bits
>>> 536:     TIMED        = 1 << 8,   // timed parked
>> 
>> Why handle TIMED this way instead of just making TIMED_PARKED/PARKING states?
>
>> Why handle TIMED this way instead of just making TIMED_PARKED/PARKING states?
> 
> Been there but it is 3 additional states and a lot simpler to just use the 
> additional state bits, like we do with SUSPENDED. We might use another one 
> for special casing sleeping, if the need arises.

Yes but TIMED and SUSPENDED are not alike. I assume SUSPENDED is a stand-alone 
bit because you can be in various states and suspended at the same time. But 
TIMED isn't like that.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/14978#discussion_r1274871863

Reply via email to