<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body>
    On 18/07/2023 01:39, viraj shetty wrote:<br>
    <blockquote type="cite" cite="mid:1328548296.1566100.1689640763010@mail.yahoo.com">
      
      <div class="ydp46a41b9eyahoo-style-wrap" style="font-size: 13px;
        font-family: Helvetica Neue, Helvetica, Arial, sans-serif;">
        <div style="">
          <div dir="ltr" data-setdir="false" style="font-family:
            Helvetica Neue, Helvetica, Arial, sans-serif;">Thanks Alan. 
            Thinking about ScopedValue as an implicit parameter is a
            good insight. Also - the javadoc for the SopedValue does
            clarify a great deal about using with StructuredTaskScope.
            Thanks for pointing me to that. </div>
          <div dir="ltr" data-setdir="false" style="font-family:
            Helvetica Neue, Helvetica, Arial, sans-serif;"><br>
          </div>
          <div dir="ltr" data-setdir="false" style="">As I was reading
            the ScopedValue Javadoc, I had another question. As part of
            the API note - the Javadoc says the following about Thread
            locals.</div>
          <div dir="ltr" data-setdir="false" style=""><br>
          </div>
          <div dir="ltr" data-setdir="false" style="">"<a href="https://urldefense.com/v3/__https://download.java.net/java/early_access/jdk21/docs/api/java.base/java/lang/InheritableThreadLocal.html__;!!ACWV5N9M2RV99hQ!JDLXL-nDPUkXz49wIKLp3IsidFtmj2LBVQpuK0f75zRjVUkoucMzmkoDCN0Ki7y_KrG4g9CKQg2H1wTFJEYVqmQ$" title="class in java.lang" rel="nofollow" target="_blank" style="font-size: 14px;" moz-do-not-send="true">Inheritance</a><span style="color: rgb(53, 56, 51); font-size: 14px;"> is
              expensive - the map of thread-locals to values must be
              copied when creating each child thread."</span><span style="color: rgb(53, 56, 51); font-size: 14px;"> </span></div>
          <div dir="ltr" data-setdir="false" style=""><span style="color: rgb(53, 56, 51); font-size: 14px;"><br>
            </span></div>
          <div dir="ltr" data-setdir="false" style=""><span style="color: rgb(53, 56, 51); font-size: 14px;">I assume
              this is referring to InheritableThreadLocals and not the
              regular ThreadLocals. My understanding is that the regular
              ThreadLocal objects don't get copied over to child
              threads </span></div>
          <br>
        </div>
      </div>
    </blockquote>
    Yes, that's right.<br>
    <br>
    -Alan<br>
  </body>
</html>