Re: ScopedValue API

2025-01-23 Thread Peter Firmstone
Having had the opportunity to use ScopedValue to replace ThreadLocal, it was suggested I might provide some feedback here. Background: I'm maintaining an OpenJDK fork that retains SM, I merge weekly from upstream, this isn't for untrusted code, it's just ensuring permissions are only granted t

Re: ScopedValue API

2025-01-22 Thread Volkan Yazıcı
Hello Peter, Thanks so much for the feedback. AFAIK, that work is delivered by the Loom crew and they use the `loom-dev` mailing list for discussions. I think they would really appreciate hearing your feedback: What is the real-world use case yo

ScopedValue API

2025-01-21 Thread Peter Firmstone
Just wanted to say, I've been experimenting with replacing ThreadLocal with ScopedValue, this is a great new API, I love the way ScopedValue uses recursion, we can have multiple immutable instances representing a scoped value for a short period and we're not worried about managing state as it g