Slide 20
Slide 20 text
Scoped Values
20
Ø Immutable
Ø All (allowed) threads use the same copy
Ø Inherited through the StructuredTaskScope to the child-virtual-threads
Ø Bounded by the scope
ScopedValue VALUE = ScopedValue.newInstance();
ScopedValue.where(VALUE, someValue)
.run(() -> {...});