Scala, Concurrency, API, Project Loom, Java.
Java 20 introduces scoped values, which aim to replace ThreadLocals, as in many ways they are broken, especially when used in conjunction with VirtualThread s. The major improvement is that the value of a ScopedValue is inherited by child threads (forked within a StructuredTaskScope), without