ScopedValue.runWhere not returning scope
Alan Bateman
Alan.Bateman at oracle.com
Fri Jun 7 08:02:00 UTC 2024
On 06/06/2024 21:53, Marcin Grzejszczak wrote:
> :
>
> I understand that with great power comes great responsibility and you
> want to guard users from cases like "opening and not closing".
It's deeper than that. It's about the lifetime of the value and the
security and robustness guarantees that go with that.
I read your initial mail about instrumentation use-cases, you may need
to define that a bit more as it's not clear if this is about bytecode
instrumentation to add hooks for telemetry or something else. In your
Proxy example it looks like the user's runnable operation is called from
Proxy.run. It's not immediately clear from that example why it's not
using ScopedValue.runWhere where ScopedValue's value is the map.
-Alan
More information about the loom-dev
mailing list