Java Cup
Inside Java

News and views from members of the Java team at Oracle

From ThreadLocal to ScopedValue with Loom - JEP Café #16

ThreadLocal variables can help you share sensitive information among the different components of an application, without resorting to method calls. They have drawbacks that are now fixed with ScopedValue variables. Understand how ScopedValue are working and how you can use them as an incubator feature in JDK 20.

Make sure to check the show-notes!