On Fri, 3 Jul 2026 03:56:34 GMT, Patricio Chilano Mateo
<[email protected]> wrote:
>> src/hotspot/share/prims/jvmtiEnvBase.cpp line 2450:
>>
>>> 2448: void
>>> 2449: StopThreadClosure::do_vthread(Handle target_h) {
>>> 2450: if (!_self && !JvmtiEnvBase::is_vthread_suspended(target_h(),
>>> _target_jt)) {
>>
>> Why is a suspend check in two places? It is not at all clear to me how to
>> the two places relate in terms of the execution call chain. Is one done by
>> the handshaker and the other by the handshakee?
>
> One is the method executed for platform threads, the other for virtual
> threads. This comes from `AdapterClosure` used in `JvmtiHandshake::execute`.
I don't understand - they are both checking vthread suspension. Do we have
different logic for virtual and non-virtual handshakers?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/31759#discussion_r3517575477