Custom Schedulers use-case

Man Cao manc at google.com
Thu Oct 9 21:11:44 UTC 2025


Hi loom developers,

Official support for custom schedulers is highly valuable to some of our
Java applications such as our colleague David Gay's use case.

Are there any major concerns or obstacles to official support for custom
schedulers?

I found recent discussions and user interests on custom schedulers, but
could not find information regarding concerns or obstacles for official
support.
- https://mail.openjdk.org/pipermail/loom-dev/2025-July/007641.html
- https://mail.openjdk.org/pipermail/loom-dev/2025-June/007584.html

-Man


On Wed, Oct 8, 2025 at 8:25 AM Liam Miller-Cushon <cushon at google.com> wrote:

> Hi,
>
> My colleague David Gay has the following use-case for Custom Schedulers (
> https://github.com/openjdk/loom/blob/fibers/loom-docs/CustomSchedulers.md
> ):
>
> 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.
>
> 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.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/loom-dev/attachments/20251009/fc789fa1/attachment.htm>


More information about the loom-dev mailing list