On Fri, 25 Oct 2024 18:39:23 GMT, Patricio Chilano Mateo 
<pchilanom...@openjdk.org> wrote:

>> src/hotspot/share/classfile/javaClasses.cpp line 2082:
>> 
>>> 2080: }
>>> 2081: 
>>> 2082: bool java_lang_VirtualThread::set_onWaitingList(oop vthread, 
>>> OopHandle& list_head) {
>> 
>> Some comments here about the operation would be useful. The "waiting list" 
>> here is just a list of virtual threads that need unparking by the Unblocker 
>> thread - right?
>> 
>> I'm struggling to understand how a thread can already be on this list?
>
>> The "waiting list" here is just a list of virtual threads that need 
>> unparking by the Unblocker thread - right?
>>
> Yes.

> Some comments here about the operation would be useful.
>
Added a comment.

>> src/hotspot/share/runtime/javaThread.hpp line 165:
>> 
>>> 163:   // ID used as owner for inflated monitors. Same as the 
>>> j.l.Thread.tid of the
>>> 164:   // current _vthread object, except during creation of the primordial 
>>> and JNI
>>> 165:   // attached thread cases where this field can have a temporal value.
>> 
>> Suggestion:
>> 
>>   // attached thread cases where this field can have a temporary value.
>> 
>> Presumably this is for when the attaching thread is executing the Thread 
>> constructor?
>
> Exactly.

Comment adjusted.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/21565#discussion_r1817193493
PR Review Comment: https://git.openjdk.org/jdk/pull/21565#discussion_r1809072960

Reply via email to