<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
<div class="">Hi.</div>
<div class=""><br class="">
</div>
The difference between ExtentLocals and other TwR constructs is that we’d like to use it for critical, foundational, things where we want guarantees we can rely on, and we haven’t been able to find a way to guarantee them as well as we’d like with TwR, even
 dynamically.
<div class=""><br class="">
</div>
<div class="">Yes, we are thinking about a "strong” TwR, but we’re busy with so many things so it might take a while. Until then, we might introduce a weaker, or less trustworthy version of ExtentLocals that uses the existing TwR and wouldn’t be used for critical
 things, but we think that it’s best to start incubation with just the lambda API and then see what problems are most common/annoying and how we can best address them.</div>
<div class=""><br class="">
</div>
<div class="">— Ron<br class="">
<div><br class="">
<blockquote type="cite" class="">
<div class="">On 29 Jul 2022, at 15:35, Holo The Sage Wolf <<a href="mailto:holo3146@gmail.com" class="">holo3146@gmail.com</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div dir="ltr" class="">Hi, 
<div class=""><br class="">
</div>
<div class="">Thanks for the response Kasper, the reason I sent the mail to core-libs is because <a class="gmail-issue-link" href="https://bugs.openjdk.org/browse/JDK-8263012" id="gmail-key-val" rel="5043705" style="font-family:"DejaVu Sans",sans-serif;font-size:14px;color:rgb(0,82,204)">JDK-8263012</a> is
 assigned to "core-libs". I added loom-devs to the chain.</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
<div class="">What <span style="white-space: pre-wrap;" class="">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?</span></div>
</div>
<div class=""><span style="white-space: pre-wrap;" class=""><br class="">
</span></div>
<div class=""><span style="white-space: pre-wrap;" class="">Yuval Paz</span></div>
</div>
<br class="">
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Fri, Jul 29, 2022 at 12:15 PM Kasper Nielsen <<a href="mailto:kasperni@gmail.com" class="">kasperni@gmail.com</a>> wrote:<br class="">
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr" class="">
<div dir="ltr" class=""><br class="">
<div class="">On Thu, 28 Jul 2022 at 22:11, Holo The Sage Wolf <<a href="mailto:holo3146@gmail.com" target="_blank" class="">holo3146@gmail.com</a>> wrote:<br class="">
</div>
</div>
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr" class="">
<p style="margin:0px 0px 1.2em" class="">I have a question about the proposal, why not allow try-with-resources with this API?</p>
</div>
</blockquote>
<div class="">Hi,</div>
<div class=""><br class="">
</div>
<div class="">For Loom related questions, <a href="mailto:loom-dev@openjdk.org" target="_blank" class="">
loom-dev@openjdk.org</a> is probably a better fit.  </div>
<div class=""><br class="">
</div>
<div class="">The main problem with TWR is that it cannot guard against non-nested use. </div>
<div class="">Because there are no way to force the user to call close(). See more here [1]</div>
<div class=""><br class="">
</div>
<div class="">/Kasper</div>
<div class=""><br class="">
</div>
<div class="">[1] <a href="https://mail.openjdk.org/pipermail/loom-dev/2021-June/002558.html" target="_blank" class="">https://mail.openjdk.org/pipermail/loom-dev/2021-June/002558.html</a>  </div>
</div>
</div>
</blockquote>
</div>
<br clear="all" class="">
<div class=""><br class="">
</div>
-- <br class="">
<div dir="ltr" class="gmail_signature">
<div dir="ltr" class="">Holo The Wise Wolf Of Yoitsu</div>
</div>
</div>
</blockquote>
</div>
<br class="">
</div>
</body>
</html>