Hi, Thanks for the response Kasper, the reason I sent the mail to core-libs is because JDK-8263012 <https://bugs.openjdk.org/browse/JDK-8263012> is assigned to "core-libs". I added loom-devs to the chain.
What Andrew Haley wrote is correct, it is also correct pretty much for every implementation of `AutoClosable` (although, unlike ExtentLocals, most implementations of AutoClosable will cause resource leak, and ExtentLocal can cause a big logical bug). The idea of `strong try-with-resources` seems to solve the problem (and can force better APIs in other places), is there a conversation about this feature? Yuval Paz On Fri, Jul 29, 2022 at 12:15 PM Kasper Nielsen <[email protected]> wrote: > > On Thu, 28 Jul 2022 at 22:11, Holo The Sage Wolf <[email protected]> > wrote: > >> I have a question about the proposal, why not allow try-with-resources >> with this API? >> > Hi, > > For Loom related questions, [email protected] is probably a better > fit. > > The main problem with TWR is that it cannot guard against non-nested use. > Because there are no way to force the user to call close(). See more here > [1] > > /Kasper > > [1] https://mail.openjdk.org/pipermail/loom-dev/2021-June/002558.html > -- Holo The Wise Wolf Of Yoitsu
