There are three commits on the java25 branch that have the full story.
https://github.com/jaamsim/jaamsim/tree/java25All of the thread management and scopes are controlled from the EventManager class. This one class is the only one that requires the multiple versions as we've been refactoring over time to simplify how many multiversion classes we'd have to deliver.
Jaamsim has a custom threadpool and subclasses of Thread (Process) that allows direct control of thread execution (only one at a time) with the ability to look up the current eventmanager from whatever Process is running. This all gets replaced with scopedvalues to look up the eventmanager and virtual threads are created instead of taken from a pool.
Context switching between runnable threads is quite a bit faster using virtual threads, as essentially the single native thread is just trading in the context from the virtual thread instead of actually switching to another OS-level thread. Happy to discuss in case anyone is interested.