On Sun, 4 Jun 2023 08:26:06 GMT, Serguei Spitsyn <sspit...@openjdk.org> wrote:

> The lines 763-764 are to correct the state exactly for passive carrier 
> thread, a carrier thread which can't progress until the execution control has 
> not been returned from a virtual thread executed on the top. It is never for 
> a platform thread which is not a carrier thread. "Passive" is the best word I 
> was able to find for this meaning. Do you have any other word/suggestion in 
> mind?

It's just a carrier. A platform thread becomes a carrier when a virtual thread 
is mounted, it ceases to be a carrier once the virtual thread is unmounted. The 
mental model is that the carrier is blocked so reporting its state as waiting 
indefinitely is correct. Maybe you don't want to rename it in this PR but 
renaming this function to something like is_carrying would convey that it's 
asking the question if a given JavaThread is carrying the given virtual thread 
oop.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/14298#discussion_r1216568827

Reply via email to