Loom Is More Than Virtual Threads
summary
Project Loom adds virtual threads, structured concurrency and scoped values to Java so you get huge concurrency without rewriting APIs, demonstrated by 108 ms to create 10,000 virtual threads and 1.3s for 1,000,000 virtual threads versus ~2000 ms for 10,000 platform threads. Structured task scopes provide policies like shutdown-on-failure cancels siblings and produce parent child relationships visible in jcmd JSON thread dumps. Scoped values offer a one way, immutable alternative to ThreadLocal suited to virtual threads and require --enable-preview until standardized.
AI-written summary · about
