On Mon, 17 Jun 2024 12:35:15 GMT, David Holmes <dhol...@openjdk.org> wrote:

> We need a comment explaining why we have to check for this as without knowing 
> the implementation quirks it seems non-sensical for a thread to have mounted 
> itself!

Just to note that JavaThread._vthread is always the "current thread". It's the 
virtual thread when mounted, the carrier (as in itself) when there is no 
virtual thread mounted. It's one this way so that the C2 instrinic for 
currentThread doesn't need a branch/test.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/19744#discussion_r1642772079

Reply via email to