On Mon, 14 Oct 2024 13:40:50 GMT, Andrew Haley <a...@openjdk.org> wrote:

>> The fourth preview of scoped values.
>
> Andrew Haley has updated the pull request incrementally with two additional 
> commits since the last revision:
> 
>  - Scoped values
>  - Scoped values

The changes in update 90a344a3 looks okay, just one example in the ScopedValue 
docs that was missed (the example is correct in the loom repo).

src/java.base/share/classes/java/lang/ScopedValue.java line 160:

> 158:  *     private static final ScopedValue<String> NAME = 
> ScopedValue.newInstance();
> 159: 
> 160:  *     ScopedValue.runWhere(NAME, "duke", () -> {

This should be `ScopedValue.where(NAME, "duke").run(() -> {`.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/21456#issuecomment-2411371574
PR Review Comment: https://git.openjdk.org/jdk/pull/21456#discussion_r1799579699

Reply via email to