Scoped Values (Second Preview)

GPTKB entity

Statements (20)
Predicate Object
gptkbp:instanceOf Java language feature
gptkbp:API gptkb:java.lang.ScopedValue
gptkbp:availableOn gptkb:Java_SE_21
gptkbp:enables safe and efficient data sharing
https://www.w3.org/2000/01/rdf-schema#label Scoped Values (Second Preview)
gptkbp:improves concurrency
gptkbp:introducedIn gptkb:JDK_21
gptkbp:previewNumber 2
gptkbp:proposedBy gptkb:JEP_446
gptkbp:purpose share immutable data within and across threads
gptkbp:replacedBy ThreadLocal for many use cases
gptkbp:scope limited to a specific code block
gptkbp:status preview feature
gptkbp:successor gptkb:ThreadLocal
gptkbp:supports virtual threads
gptkbp:threadSafe yes
gptkbp:bfsParent gptkb:Java_SE_22
gptkb:Java_22
gptkb:JDK_22
gptkbp:bfsLayer 7