On 19/05/2021 10:15, Andrew Haley wrote:
:
Yes, that's true. I think that what you have in mind is a more elaborate
mechanism than what is proposed here, which does no more than bind values
to names over a scope. There needs to be more discussion in the JEP of
what this proposal isn't intended to do, and how we might cope with
mutability of a scope local's values.

Also just to add that the closable-resource in the example is being used on concurrent threads so it already has to cope with attempted usage after close or async close (close while in use). Also once we combine this with SC then we can be sure that the child task has completed before closing the resource.

-Alan

Reply via email to