Naming Things - Task and Subtask
Andrew Haley
aph-open at littlepinkcloud.com
Fri May 26 09:44:11 UTC 2023
On 5/19/23 20:16, Holo The Sage Wolf wrote:
> I think that:
[ TWR-style] scoped values
> Is better (note that this is currently impossible because of how scopedValued are implemented. Something I talked about in this mailing-list long ago and was pushed back because Java’s TWR is not good enough to guarantee no memory leaks from mis-using ScopedValues),
No, that's not the reason. ScopedValue is implemented using Callables because
it is the only way to make the structure robust. While this has implications for
preventing memory leaks, robustness implies much more than that.
Among other things, it means that we can use scoped values to carry handles
which access capabilities, e.g. foreign memory access.
A better question to answer, IMO, is how to add enough syntactic sugar around
Lambda calls to handle Exceptions nicely. The Lambda itself doesn't have to be
visible to the programmer.
--
Andrew Haley (he/him)
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
https://keybase.io/andrewhaley
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671
More information about the loom-dev
mailing list