Class ScopedValuesIncubatorNotes
java.lang.Object
net.jrodolfo.java_evolution.java20.ScopedValuesIncubatorNotes
Explains scoped values, introduced as an incubating API in Java 20.
ThreadLocal can pass contextual data through a call stack without
adding parameters everywhere, but mutable thread-local state is easy to leak
or forget to clean up. Scoped values were introduced to provide a safer model
for sharing immutable context within a bounded execution scope.
The Java 20 API was incubating, so this repository documents the problem and intent without depending on the incubator module.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionExplains why this package keeps Java 20 scoped values as notes.purpose()Explains the basic goal of scoped values.Compares scoped values with a common older approach.
-
Constructor Details
-
ScopedValuesIncubatorNotes
public ScopedValuesIncubatorNotes()
-
-
Method Details
-
purpose
-
relationToThreadLocal
Compares scoped values with a common older approach.- Returns:
- a short comparison
-
projectDecision
Explains why this package keeps Java 20 scoped values as notes.- Returns:
- the project decision
-