On 26/02/2026 02:49, Mengyang Li wrote:
Hello everyone, With “Custom Scheduler Prototype v2”, the JDK loads the class specified by jdk. virtualThreadScheduler. implClass via the internal AppClassLoader. This works for typical apps, but fails for Spring Boot fat JARs where the application


:

Would it be feasible to switch to an SPI  (similar to JDBC) so custom schedulers are pluggable under non-standard class loaders? Potentially the same approach could apply to a pluggable Poller API.


In this prototype, the scheduler is configured system-wide and cannot be changed mid-flight. It has to be visible to the application class loader, otherwise there would be no way to schedule virtual threads before the custom class loader is created. It can be re-visited if efforts in this area go further than the prototype. For now, the custom scheduler has to deployed on the class path or module path.

There is no Poller API. The class that I think you have found the JDK internal class that supports blocking operations when using the Socket and other networking APIs. It's not something that we want to expose in any way. If the context for your comment is a library that does syscalls directly (FFM or JNI) then the "primitive" that it can use to park/unpark virtual threads is LockSupport.park/unpark, it does not need Poller.

-Alan

Reply via email to