<!DOCTYPE html><html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body>
    On 20/08/2024 16:32, Rick Hendricksen wrote:<br>
    <blockquote type="cite" cite="mid:DB9PR07MB863328442235DF543BBF73E18C8D2@DB9PR07MB8633.eurprd07.prod.outlook.com">
      
      <meta name="Generator" content="Microsoft Word 15 (filtered medium)">
      <style>@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;}p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-ligatures:standardcontextual;
        mso-fareast-language:EN-US;}span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}.MsoChpDefault
        {mso-style-type:export-only;
        mso-fareast-language:EN-US;}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]-->
      <div class="WordSection1">
        <p><span lang="en-NL">Hi,<o:p></o:p></span></p>
        <p><span lang="en-NL">We have implemented a Discrete Event
            Simulator, and we want to use virtual threads to write our
            business logic (that uses the DES) in a more readable way.
            This business logic has a lot of blocking operations, so it
            seems to be a good fit for virtual threads. However, we must
            ensure that all those virtual threads run on the same
            carrier thread, because the simulation has to be
            deterministic. We also often run multiple separate
            simulations in parallel, so it’s important that virtual
            threads end up on the right scheduler. This means we need to
            use our own scheduler.</span></p>
      </div>
    </blockquote>
    Can the <span lang="en-NL">simulation be run with a single carrier
      thread (-Djdk.virtualThreadScheduler.maxPoolSize=1) ?<br>
      <br>
      There are a number of explorations into using custom schedulers
      but impossible to say at this point if anything will be exposed.<br>
      <br>
      -Alan<br>
    </span>
  </body>
</html>