<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof">
<pre style="font-size: 12pt; background-color: rgb(255, 255, 255);" class="ContentPasted0 ContentPasted1">I would like to request clarification on how JVMTI resume and suspend work for a virtual thread and its associated carrier thread.<div><br class="ContentPasted1"></div><div class="ContentPasted1">Virtual thread runs on a carrier thread. Both are separate Java objects. JVMTI functions can be invoked separately on them. What is the relationship between the state of a virtual and carrier thread when JVMTI suspend and resume functions are invoked on them?</div><div><br class="ContentPasted1"></div><div class="ContentPasted1">jvmti->SuspendThread(virtualThread) // Will this also suspend the carrier thread?</div><div class="ContentPasted1">jvmti->SuspendThread(carrierThread) // Will this also suspend the virtual thread?</div><div class="ContentPasted1">jvmti->ResumeThread(virtualThread) // Will this resume both virtual thread and its carrier thread?</div><div class="ContentPasted1">jvmti->ResumeThread(carrierThread) // Will this just resume the carrier thread and virtual thread will stay suspended?</div><div><br class="ContentPasted1"></div>Can someone please provide the exact behaviour for the above JVMTI calls?<br class="ContentPasted1"><br class="ContentPasted1">Regards,<br class="ContentPasted1">Babneet</pre>
<br>
<pre style="orphans:2;widows:2" class="ContentPasted0"><br><br></pre>
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof">
<br>
</div>
</body>
</html>