<div dir="ltr"><div>Hi loom developers,</div><div><br></div><div>Official support for custom schedulers is highly valuable to some of our Java applications such as our colleague David Gay's use case.</div><div><br></div><div><div>Are there any major concerns or obstacles to official support for custom schedulers?</div></div><div><br></div><div>I found recent discussions and user interests on custom schedulers, but could not find information regarding concerns or obstacles for official support.</div><div>- <a href="https://mail.openjdk.org/pipermail/loom-dev/2025-July/007641.html">https://mail.openjdk.org/pipermail/loom-dev/2025-July/007641.html</a></div><div>- <a href="https://mail.openjdk.org/pipermail/loom-dev/2025-June/007584.html">https://mail.openjdk.org/pipermail/loom-dev/2025-June/007584.html</a></div><div><br></div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">-Man</div></div></div><br></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Wed, Oct 8, 2025 at 8:25 AM Liam Miller-Cushon <<a href="mailto:cushon@google.com">cushon@google.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>My colleague David Gay has the following use-case for Custom Schedulers (<a href="https://github.com/openjdk/loom/blob/fibers/loom-docs/CustomSchedulers.md" target="_blank">https://github.com/openjdk/loom/blob/fibers/loom-docs/CustomSchedulers.md</a>):</div><div><br></div><div>A multi-tenant server needs to provide isolation, in particular CPU isolation, between the workloads of different customers. A good way to achieve this when using virtual threads is to use some form of fair-share scheduler to allocate carrier threads to virtual threads. Custom schedulers provide a straightforward, efficient, and safe way to support this use case.<br><br>Absent custom schedulers, it is possible to work around this by surrounding all blocking points in a virtual thread by blocking interactions with the fair scheduler. This however poses significant reliability risks, as identifying these points is not straightforward and missing any of them affects the fairness of the scheduling and risks starvation or deadlock.</div></div>
</blockquote></div>