As concurrency moves from 20 pooled threads to tens of thousands of per-task Virtual Threads, old patterns break: ThreadLocal causes per-thread leaks/bloat, and detached futures outlive failing parents. ScopedValue (finalized Java 25) and Structured Concurrency fix both cleanly.
More lessons in Complete Core Java