<div dir="ltr"><div dir="ltr">Em qua., 2 de nov. de 2022 às 15:07, Carter Kozak <<a href="mailto:ckozak@ckozak.net">ckozak@ckozak.net</a>> escreveu:<br></div><div class="gmail_quote"><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="msg-7945224823477635265"><div><div>My fear, however, is that by making ThreadLocal support on a per-thread basis configurable, we make them dangerous to use in any code that cannot be directly traced to thread creation (all library code). While the current proposal does not deprecate ThreadLocal, I would argue that they become de facto deprecated once they’re no longer guaranteed to work depending on external factors (the thread an external caller used).</div></div></div></blockquote><div> </div><div>I agree.</div><div>This will transitively introduce a new error condition on all code paths which *may* invoke TL.set.</div><div>Test suites for such code will have *less* coverage.</div><div>I believe coding manuals will declare this feature off limits for everyone except the most expert framework implementation teams.</div><div></div></div><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div>Pedro Lamarão</div></div></div></div>