Skip to content

The Scoped Values API allows us to store and share data for a bounded lifetime. This repository shows how you can use it.

Notifications You must be signed in to change notification settings

hakdogan/scoped-values

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Scoped Values

The Scoped Values API allows us to store and share immutable data for a bounded lifetime. It has been included in the JDK since Java 20 as an incubator API. This repository shows how you can use it with Virtual Threads and Structured Concurrency.

Requirement

JDK 20 or later

Ho to compile?

mvn clean install
jar cmf ./META-INF/MANIFEST.FM scoped-values.jar -C ./target/classes/ .

or

sh ./compile.sh   

Ho to run?

java --enable-preview --add-modules jdk.incubator.concurrent -jar scoped-values.jar

or

sh ./run.sh   

Relevant article is

An introduction to Scoped Values in Java

About

The Scoped Values API allows us to store and share data for a bounded lifetime. This repository shows how you can use it.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published