<html 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=Windows-1252">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Helvetica;
        panose-1:0 0 0 0 0 0 0 0 0 0;}
@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.apple-converted-space
        {mso-style-name:apple-converted-space;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style>
</head>
<body lang="FR" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">My concern right now is not constant high rate of slowCPURequets or having Loom threads handle arbitrary high CPU load for long time.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">It’s just that Loom (default Executor) makes some real scenarios worse compared to classic Executor, like the modest burst of slowCPURequests causing brutal pause on fastIORequests in
 the code example.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">(Again, there are workarounds, but it makes Loom transition more complex/sensitive for _some_ webapps.)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">About the operational band:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">Let’s say C is the number is of available CPUs (or Pod CPU limit)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">and M the max number of active native threads beyond which your pod becomes useless.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">You assume any concurrent CPU activity between C and M is irrelevant, but it doesn’t make sense for me: why would it be better to be stuck suddenly with long pauses at C rather than
 scaling gracefully until M?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">Interestingly, the scenario you consider (</span><span lang="EN-US">postponing a batch job to run at a much later time) is less relevant in my opinion in modern cloud environment where
 you want your pod to migrate smoothly but quickly (save state/stop/restart/reload state in a few minutes max) during cluster scaling for example.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">Thanks<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">Arnaud<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div>
<p class="MsoNormal" style="margin-left:35.4pt;mso-line-height-alt:.75pt"><span lang="EN-US" style="font-size:1.0pt;color:white">As I wrote to the mailing list some years ago, the virtual thread scheduler is designed in a way that will create this phenomenon,
 and it is done in this way because two things are unclear: 1. </span><span style="font-size:1.0pt;color:white">Whether or not this phenomenon is a problem, and
<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt;mso-line-height-alt:.75pt"><span style="font-size:1.0pt;color:white">ZjQcmQRYFpfptBannerStart<o:p></o:p></span></p>
</div>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-US">As I wrote to the mailing list some years ago, the virtual thread scheduler is designed in a way that will create this phenomenon, and it is done in this way because two things are unclear:
 1. Whether or not this phenomenon is a problem, and 2. Whether time-sharing could help if it is. What is unclear is not whether such circumstances could hypothetically arise, but whether or not they actually do, and if so, at what frequency.
<o:p></o:p></span></p>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-US"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-US">Let’s examine what would be required for your example to manifest as a problem that time-sharing could help with: the rate of slowCPURequest needs to be high enough to saturate the CPU for long
 enough to cause a significant increase in the latency of fastIORequest, and at the same time low enough not to destabilise the server so that requests start piling up (for the server to be stable, the average throughput must be exactly equal to the average
 request rate). If the rate of slowCPURequest is any higher or lower, time sharing won’t help.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-US"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-US">So the question is, how common is it for servers to run in that operational band, and how do such servers ensure that they can always maintain their throughput and don’t destabilise? This is
 the kind of information that will allow us to to start working on time-sharing, and it requires a report, not any kind of convincing. We can’t work on a fix for problem X encountered while running server Y until we get a report saying “I’ve encountered problem
 X while running server Y”. <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-US"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-US">At this time, however, I will appreciate it if someone could explain why it is so hard to understand that we cannot fix a bug until it is reported that I’ve had to repeat this so many times.
 Even if we decided today that we’re dropping everything else and working on time-sharing in the scheduler because that is the most urgent thing to work on, we still couldn’t do it without the information required to know when the problem is fixed and we can
 move on to something else. If it’s hard to understand because you think it is obvious that this bug will occur since the scenario I described above is common, then someone will report it soon enough, at which point we’ll have at least some of the relevant
 operational parameters and will then be able to start considering solutions. Without that necessary information, it doesn’t matter how much we want to work on a fix; we simply can’t.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-US"><o:p> </o:p></span></p>
</div>
<div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-US">Now, while it won’t help us identifying a bug, it might be interesting for you to at least simulate an *endless* stream of requests, and try different rates of the two kinds of operations (and
 add at least a bit more CPU usage in the fastIO case).<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-US"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-US">— Ron<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-US"><br>
<br>
<o:p></o:p></span></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-US">On 9 Jan 2023, at 12:04, Arnaud Masson <</span><a href="mailto:arnaud.masson@fr.ibm.com"><span lang="EN-US">arnaud.masson@fr.ibm.com</span></a><span lang="EN-US">> wrote:<o:p></o:p></span></p>
</div>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-US"><o:p> </o:p></span></p>
<div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-US">I doubt it will suddenly convince anyone, but I wrote a minimal example to illustrate the concrete problem.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-US">With the classic thread executor, the normal requests (fastIORequest) complete quickly even during concurrent CPU requests (slowCPURequest), while using the default Loom executor they are stuck
 for some time.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-US"> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-US">Arnaud<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-US"> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-US"> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt;background:white"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#0033B3">package<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black">org.example</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">;<br>
<br>
</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#0033B3">import<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black">java.time.Duration</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">;<br>
</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#0033B3">import<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black">java.time.Instant</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">;<br>
</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#0033B3">import<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black">java.util.ArrayList</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">;<br>
</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#0033B3">import<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black">java.util.Timer</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">;<br>
</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#0033B3">import<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black">java.util.TimerTask</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">;<br>
</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#0033B3">import<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black">java.util.concurrent.Executors</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">;<br>
</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#0033B3">import<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black">java.util.concurrent.Future</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">;<br>
<br>
<br>
</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#0033B3">public class<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black">MixedServer<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">{<br>
<br>
  <span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#0033B3">static final<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black">Instant<span class="apple-converted-space"> </span></span><i><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#871094">t0<span class="apple-converted-space"> </span></span></i><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">=<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black">Instant</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">.<i>now</i>();<br>
<br>
  <span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#0033B3">static long<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#00627A">slowCPURequest</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">(</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black">String<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">name,<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black">Instant<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">posted)<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#0033B3">throws<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black">Exception<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">{<br>
     <span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#0033B3">long<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black">t<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">=<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#1750EB">0</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">;<br>
     <span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#0033B3">var<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black">n<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">=<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#1750EB">1e9</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">;<br>
     <span class="apple-converted-space"> </span><br>
      </span><i><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#8C8C8C">// slow CPU-only stuff: e.g. image codec, XML manip, collection iteration, ...<br>
     <span class="apple-converted-space"> </span></span></i><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#0033B3">for<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">(</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#0033B3">int<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black">i<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">=<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#1750EB">0</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">;<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black">i<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808"><<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black">n</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">;<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black">i</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">++)
 {<br>
        <span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black">t<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">=<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black">t<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">+<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#1750EB">2</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">;<br>
      }<br>
     <span class="apple-converted-space"> </span><br>
      </span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#0033B3">var<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black">completed<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">=<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black">Instant</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">.<i>now</i>();<br>
     <span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black">System</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">.</span><i><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#871094">out</span></i><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">.println(</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black">Duration</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">.<i>between</i>(</span><i><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#871094">t0</span></i><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">,<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black">Instant</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">.<i>now</i>())
 +<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#067D17">" - "<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">+
 name<br>
            + <span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#067D17">" completed (duration: "<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">+<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black">Duration</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">.<i>between</i>(posted,<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black">completed</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">)
 +<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#067D17">")"</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">);<br>
     <span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#0033B3">return<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black">t</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">;<br>
   }<br>
<br>
  <span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#0033B3">static<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black">Object<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#00627A">fastIORequest</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">(</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black">Instant<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">posted)<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#0033B3">throws<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black">Exception<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">{<br>
     <span class="apple-converted-space"> </span></span><i><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#8C8C8C">// IO stuff, e.g. JDBC call<br>
      // (but sleep would have the same effect for this test, i.e. block the thread)<br>
     <span class="apple-converted-space"> </span></span></i><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black">Thread</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">.<i>sleep</i>(</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#1750EB">2</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">);<br>
     <span class="apple-converted-space"> </span><br>
      </span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#0033B3">var<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black">completed<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">=<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black">Instant</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">.<i>now</i>();<br>
     <span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black">System</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">.</span><i><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#871094">out</span></i><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">.println(</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black">Duration</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">.<i>between</i>(</span><i><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#871094">t0</span></i><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">,<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black">Instant</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">.<i>now</i>())
 +<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#067D17">" - fast IO task"<br>
           <span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">+ <span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#067D17">"
 completed (duration: "<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">+<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black">Duration</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">.<i>between</i>(posted,<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black">completed</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">)
 +<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#067D17">")"</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">);<br>
     <span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#0033B3">return null</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">;<br>
   }<br>
  <span class="apple-converted-space"> </span><br>
   <br>
   </span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#0033B3">public static void<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#00627A">main</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">(</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black">String</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">[]
 args)<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#0033B3">throws<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black">Exception<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">{<br>
     <span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#0033B3">var<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black">executor<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">=<br>
           <span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black">Executors</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">.<i>newVirtualThreadPerTaskExecutor</i>();<span class="apple-converted-space"> </span></span><i><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#8C8C8C">//
 unfair<br>
            //Executors.newCachedThreadPool(); // fair<br>
     <span class="apple-converted-space"> </span><br>
      </span></i><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#0033B3">var<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black">timer<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">=<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#0033B3">new<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">Timer();<br>
     <span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black">timer</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">.schedule(</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#0033B3">new<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black">TimerTask</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">()
 {<br>
        <span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#9E880D">@Override<br>
        <span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#0033B3">public void<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#00627A">run</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">()
 {<br>
           <span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#0033B3">var<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black">posted<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">=<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black">Instant</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">.<i>now</i>();<br>
           <span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#851691">executor</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">.submit(() -><span class="apple-converted-space"> </span><i>fastIORequest</i>(</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#851691">posted</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">));<br>
         }<br>
      },<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#1750EB">100</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">,<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#1750EB">100</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">);<br>
     <span class="apple-converted-space"> </span><br>
      </span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#0033B3">var<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black">futures<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">=<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#0033B3">new<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">ArrayList<</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black">Future</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">>();<br>
     <span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#0033B3">for<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">(</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#0033B3">int<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black">i<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">=<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#1750EB">0</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">;<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black">i<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808"><<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#1750EB">60</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">;<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black">i</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">++)
 {<br>
        <span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#0033B3">final var<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black">name<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">=<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#067D17">"Task_"<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">+<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black">i</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">;<br>
        <span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#0033B3">var<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black">posted<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">=<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black">Instant</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">.<i>now</i>();<br>
        <span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black">futures</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">.add(</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black">executor</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">.submit(()
 -><span class="apple-converted-space"> </span><i>slowCPURequest</i>(</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#851691">name</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">,<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#851691">posted</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">)));<br>
      }<br>
     <span class="apple-converted-space"> </span><br>
      </span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#0033B3">for<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">(</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black">Future
 f</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">:<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black">futures</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">)<br>
        <span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black">f</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">.get();<br>
<br>
     <span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black">System</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">.</span><i><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#871094">out</span></i><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">.println(</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#067D17">"---
 done ---"</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">);<br>
     <span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black">executor</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">.shutdownNow();<br>
     <span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black">timer</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#080808">.cancel();<br>
   }<br>
}</span><span lang="EN-US"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-US"> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-US"> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-US"> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-US"> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-US"> <o:p></o:p></span></p>
</div>
<div>
<div style="margin-left:35.4pt">
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-US" style="font-size:1.0pt;color:white">Great, then one someone who runs CPU-heavy jobs that are appropriate for virtual threads presents a problem the’ve encountered that could be solved by some
 form of time-sharing, we’ll take a look. For the time being, we have a hypothesis that</span><span lang="EN-US"><o:p></o:p></span></p>
</div>
</div>
<div>
<div style="margin-left:35.4pt">
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-US" style="font-size:1.0pt;color:white">ZjQcmQRYFpfptBannerStart</span><span lang="EN-US"><o:p></o:p></span></p>
</div>
</div>
<div style="margin-left:35.4pt">
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-US">Great, then one someone who runs CPU-heavy jobs that are appropriate for virtual threads presents a problem the’ve encountered that could be solved by some form of time-sharing, we’ll take a
 look.<span class="apple-converted-space"> </span>For the time being, we have a hypothesis that one or more problems could occur, and a further hypothesis that some class of solutions might fix or mitigate them. Unfortunately, theses hypotheses are not presently
 actionable.<o:p></o:p></span></p>
</div>
<div>
<div style="margin-left:35.4pt">
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-US"> <o:p></o:p></span></p>
</div>
</div>
<div>
<div style="margin-left:35.4pt">
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-US">I don’t know what problem Go’s maintainers solve with time-sharing. Maybe they just want to solve Go’s lack of convenient access to a scheduler with time-sharing even in the case of background
 processing tasks — a problem that Java doesn’t have — or perhaps they’ve managed to identify common server workloads that could be helped by time-sharing, in which case we’d love to see those workloads so that we can make sure our fix works.<o:p></o:p></span></p>
</div>
<div>
<div style="margin-left:35.4pt">
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-US"> <o:p></o:p></span></p>
</div>
</div>
<div>
<div style="margin-left:35.4pt">
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-US">I am not at all resistant to adding time-sharing to the virtual thread scheduler. I am resistant to fixing bugs that have not been reported. I have said many times — and not just on the mailing
 lists — that the best and often only way to get a some change made to Java is to report a problem. You might have noticed that all JEPs start with a motivation section that attempts to clearly present a problem that’s encountered by Java’s users (and sometimes
 maintainers) and analyse its relative severity to justify the proposed solution. That is usually the JEP’s most important section (and the section we  typically spend most time writing) because the most important thing is to understand the problem you’re trying
 to tackle. Every change has a cost. A feature might add overhead that harms workloads that don’t benefit from it, and it certainly has an opportunity cost. Neither of these is disqualifying, but we simply cannot judge the pros and cons of doing something until
 we can weigh some problem against another, and we can’t even get started on this process until we have a problem in front of us.<o:p></o:p></span></p>
</div>
</div>
<div>
<div style="margin-left:35.4pt">
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-US"> <o:p></o:p></span></p>
</div>
</div>
<div>
<div style="margin-left:35.4pt">
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-US">We *have* been presented with a problem that some specific kind of time-sharing can solve (postponing a batch job that’s consuming resources to run at a much later time), and it is one of the
 reasons we’ve added custom schedulers that will be able to employ it to our roadmap. It is certainly possible that the lack of time-sharing causes problems that need addressing in the default (currently only) virtual-thread scheduler — I am not at all dismissing
 that possibility — but there’s not much we can do until those problems are actually reported to us, which would allow us to know more about when those problems occur, how frequently, and what kind of time-sharing can assist in which circumstances and to what
 degree. There’s no point in trying to convince us of something we are already convinced of, namely that the possibility exists that some virtual thread workloads could be significantly helped by time-sharing. In fact, I’ve mentioned that possibility on this
 mailing list a few times already.<o:p></o:p></span></p>
</div>
</div>
<div>
<div style="margin-left:35.4pt">
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-US"> <o:p></o:p></span></p>
</div>
</div>
<div>
<div style="margin-left:35.4pt">
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-US">If the problems are common, now that more people are giving virtual threads a try, I expect they will be reported by someone soon enough and we could start the process of tackling them.<o:p></o:p></span></p>
</div>
</div>
<div>
<div style="margin-left:35.4pt">
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-US"> <o:p></o:p></span></p>
</div>
</div>
<div>
<div style="margin-left:35.4pt">
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-US">— Ron<o:p></o:p></span></p>
</div>
<div>
<div style="margin-left:35.4pt">
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-US"><br>
<br>
<br>
<o:p></o:p></span></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<div style="margin-left:35.4pt">
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-US">On 9 Jan 2023, at 08:48, Sam Pullara <</span><a href="mailto:spullara@gmail.com"><span lang="EN-US">spullara@gmail.com</span></a><span lang="EN-US">> wrote:<o:p></o:p></span></p>
</div>
</div>
<div style="margin-left:35.4pt">
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-US"> <o:p></o:p></span></p>
</div>
<div>
<div>
<div style="margin-left:35.4pt">
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-US">Ron, I think you are being purposefully obtuse by not recognizing that some folks are going to run high CPU jobs in vthreads. The proof is with the folks using Go that already encountered it
 and fixed it.<o:p></o:p></span></p>
</div>
</div>
<div style="margin-left:35.4pt">
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-US"> <o:p></o:p></span></p>
</div>
<div>
<div>
<div style="margin-left:35.4pt">
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-US">On Mon, Jan 9, 2023 at 12:46 AM Arnaud Masson <</span><a href="mailto:arnaud.masson@fr.ibm.com"><span lang="EN-US">arnaud.masson@fr.ibm.com</span></a><span lang="EN-US">> wrote:<o:p></o:p></span></p>
</div>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt">
<div>
<div>
<div>
<div style="margin-left:35.4pt">
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-US">Side note : it seems “more” preemptive time sharing was added for goroutines in Go 1.14 to avoid the kind of scheduling starvation we discussed:<o:p></o:p></span></p>
</div>
<div style="margin-left:35.4pt">
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-US"> <o:p></o:p></span></p>
</div>
<div style="margin-left:35.4pt">
<p class="MsoNormal" style="margin-left:35.4pt"><a href="https://medium.com/a-journey-with-go/go-asynchronous-preemption-b5194227371c" target="_blank"><span lang="EN-US">https://medium.com/a-journey-with-go/go-asynchronous-preemption-b5194227371c</span></a><span lang="EN-US"><o:p></o:p></span></p>
</div>
<div style="margin-left:35.4pt">
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-US"> <o:p></o:p></span></p>
</div>
<div style="margin-left:35.4pt">
<p class="MsoNormal" style="margin-left:35.4pt">Thanks<o:p></o:p></p>
</div>
<div style="margin-left:35.4pt">
<p class="MsoNormal" style="margin-left:35.4pt">Arnaud<o:p></o:p></p>
</div>
<div style="margin-left:35.4pt">
<p class="MsoNormal" style="margin-left:35.4pt"> <o:p></o:p></p>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</blockquote>
</div>
<div style="margin-left:35.4pt">
<p class="MsoNormal" style="margin-left:35.4pt"> <o:p></o:p></p>
</div>
</div>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><span style="font-size:9.0pt;font-family:Helvetica">Unless otherwise stated above:<br>
<br>
Compagnie IBM France<br>
Siège Social : 17, avenue de l'Europe, 92275 Bois-Colombes Cedex<br>
RCS Nanterre 552 118 465<br>
Forme Sociale : S.A.S.<br>
Capital Social : 664 069 390,60 €<br>
SIRET : 552 118 465 03644 - Code NAF 6203Z<o:p></o:p></span></p>
</div>
</div>
</blockquote>
</div>
<p class="MsoNormal" style="margin-left:35.4pt"><o:p> </o:p></p>
</div>
</div>

<DIV>
Unless otherwise stated above:<BR>
<BR>
Compagnie IBM France<BR>
Siège Social : 17, avenue de l'Europe, 92275 Bois-Colombes Cedex<BR>
RCS Nanterre 552 118 465<BR>
Forme Sociale : S.A.S.<BR>
Capital Social : 664 069 390,60 €<BR>
SIRET : 552 118 465 03644 - Code NAF 6203Z<BR>
</DIV></body>
</html>