<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-CA link=blue vlink=purple style='word-wrap:break-word'><div class=WordSection1><p class=MsoNormal><span style='mso-fareast-language:EN-US'>The way I look at it now, if operations are blocking, then creating more Virtual Threads creates more opportunities for unblocked code to run.<br><br>In the past, we could not create enough Platform Threads to create such opportunities, and we had to rely on non-blocking patterns, such as Reactive programming. Akka/Scala demonstrated this years ago as being very effective.<br><br>Loom simply allows us the same power of concurrency, without having to follow non-blocking patterns…<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'>Cheers, Eric<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'><o:p> </o:p></span></p><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=EN-US>From:</span></b><span lang=EN-US> loom-dev <loom-dev-retn@openjdk.org> <b>On Behalf Of </b>Pedro Lamarão<br><b>Sent:</b> July 15, 2022 7:05 AM<br><b>To:</b> Alex Otenko <oleksandr.otenko@gmail.com><br><b>Cc:</b> Ron Pressler <ron.pressler@oracle.com>; loom-dev <loom-dev@openjdk.java.net><br><b>Subject:</b> Re: [External] : Re: jstack, profilers and other tools<o:p></o:p></span></p></div><p class=MsoNormal><o:p> </o:p></p><div><div><p class=MsoNormal>Em sex., 15 de jul. de 2022 às 05:39, Alex Otenko <<a href="mailto:oleksandr.otenko@gmail.com">oleksandr.otenko@gmail.com</a>> escreveu:<o:p></o:p></p></div><div><div><p class=MsoNormal> <o:p></o:p></p></div><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm'><div><div><p class=MsoNormal>Adding threads allows to do more work. But you can't do more work at will - the amount of work going through the system is a quantity independent of your design.<o:p></o:p></p></div></div></blockquote><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>I think that, more precisely, the maximum amount of work that can go through a concrete system is a quantity independent of programmer design.<o:p></o:p></p></div><div><p class=MsoNormal>Nobody is arguing that increasing the quantity of threads will increase work throughput in a machine with devices already at full capacity.<o:p></o:p></p></div><div><p class=MsoNormal>What is being argued is that, since "task" is one of the machine's "devices" consumed to do work, <o:p></o:p></p></div><div><p class=MsoNormal>increasing the capacity for "tasks" increases the maximum amount of work that can go through etc.<o:p></o:p></p></div><div><p class=MsoNormal>If there are free processors, free memory, free network bandwidth, free storage bandwidth etc. etc. then doing more work concurrently will increase work throughput.<o:p></o:p></p></div></div><div><p class=MsoNormal><o:p> </o:p></p></div><p class=MsoNormal>-- <o:p></o:p></p><div><div><p class=MsoNormal>Pedro Lamarão<o:p></o:p></p></div></div></div></div></body></html>