<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
Thanks, all clear.</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Ron Pressler <ron.pressler@oracle.com><br>
<b>Sent:</b> Monday, June 26, 2023 4:01 PM<br>
<b>To:</b> Danish Nawab <dnawab@outlook.com><br>
<b>Cc:</b> loom-dev@openjdk.org <loom-dev@openjdk.org><br>
<b>Subject:</b> Re: [External] : Re: Native interop with Virtual Threads</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText"><br>
<br>
> On 26 Jun 2023, at 17:45, Danish Nawab <dnawab@outlook.com> wrote:<br>
> <br>
> Thanks Ron. <br>
> <br>
> What about native code that doesn’t make an upcall but does a blocking operation directly (via OS syscalls or similar)? Are such cases also rare?
<br>
<br>
Yes. But supporting those — even if there was reason to — would have been even harder, as Java has no control or knowledge over what native code does.<br>
<br>
> <br>
> What would be the advice if someone is making blocking calls from their downcalls? It might not always be possible to rewrite it in Java.
<br>
<br>
If those operations are both frequent and lengthy, they shouldn’t be done on virtual threads.<br>
<br>
— Ron</div>
</span></font></div>
</body>
</html>