Custom scheduler: Using loom for deterministic simulation testing

Ryan Yeats ryeats at gmail.com
Wed Jul 9 02:22:06 UTC 2025


Yannick,

  Thank you, this is very useful information! It's a good point about
extending Thread since ForkJoinWorkerThread will be problematic for
the common fork join pool which is used by .stream().parallel().
Additionally worth noting that GC pauses in the middle of a non
blocking code, JIT changes which can cause race conditions and
accessing volatiles won't necessarily be tested fully when using
virtual threads to simulate execution deterministically.

That being said not all indeterminism will affect execution enough to
matter either, so despite these extensive lists I still believe that
Loom with a deterministic scheduler will be useful and I am glad to
hear others experimenting with this too!

Ryan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/loom-dev/attachments/20250708/ee0b8afc/attachment.htm>


More information about the loom-dev mailing list