<div dir="ltr"><div>> What would a Scope object look like? What would you do with one?</div><div><br></div><div>Essentially it would be Closeable. I would store it in e.g. `onScopeOpened` and then pass it onto `onScopeClosed` and close it there.<br></div><div><br></div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Pozdrawiam / Best regards,</div><div>Marcin Grzejszczak</div><div><br><div><a href="https://marcin.grzejszczak.pl" target="_blank">https://marcin.grzejszczak.pl</a></div><div><a href="https://toomuchcoding.com" target="_blank">https://toomuchcoding.com</a></div></div></div></div></div></div></div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">pon., 10 cze 2024 o 16:17 Andrew Haley <<a href="mailto:aph-open@littlepinkcloud.com">aph-open@littlepinkcloud.com</a>> napisał(a):<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 6/10/24 15:48, Marcin Grzejszczak wrote:<br>
> Do I understand correctly that ScopedValues will be significantly faster<br>
> than Thread Locals?<br>
<br>
In some cases, yes.<br>
<br>
> If that's the case just by returning a Scope object<br>
> instead of expecting a lambda all the tracing libraries and all<br>
> instrumentations that are out there will not need a major redesign. I think<br>
> that it's worthwhile to consider such an option in that scenario.<br>
<br>
I don't understand this.<br>
<br>
What would a Scope object look like? What would you do with one?<br>
<br>
-- <br>
Andrew Haley (he/him)<br>
Java Platform Lead Engineer<br>
Red Hat UK Ltd. <<a href="https://www.redhat.com" rel="noreferrer" target="_blank">https://www.redhat.com</a>><br>
<a href="https://keybase.io/andrewhaley" rel="noreferrer" target="_blank">https://keybase.io/andrewhaley</a><br>
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671<br>
<br>
</blockquote></div>