<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    On 2/19/2013 11:00 AM, Staffan Larsen wrote:<br>
    <blockquote
      cite="mid:DFF2B5A8-F847-41E0-89C4-2A06C2EACB9D@oracle.com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=ISO-8859-1">
      <br>
      <div>
        <div>On 19 feb 2013, at 19:56, Dean Long &lt;<a
            moz-do-not-send="true" href="mailto:dean.long@oracle.com">dean.long@oracle.com</a>&gt;
          wrote:</div>
        <br class="Apple-interchange-newline">
        <blockquote type="cite"><span style="font-family: Helvetica;
            font-size: medium; font-style: normal; font-variant: normal;
            font-weight: normal; letter-spacing: normal; line-height:
            normal; orphans: 2; text-align: -webkit-auto; text-indent:
            0px; text-transform: none; white-space: normal; widows: 2;
            word-spacing: 0px; -webkit-text-size-adjust: auto;
            -webkit-text-stroke-width: 0px; display: inline !important;
            float: none; ">When the VM_Operation is created, we could
            take a snapshot of the thread_id of the caller, then use
            that later.</span><br style="font-family: Helvetica;
            font-size: medium; font-style: normal; font-variant: normal;
            font-weight: normal; letter-spacing: normal; line-height:
            normal; orphans: 2; text-align: -webkit-auto; text-indent:
            0px; text-transform: none; white-space: normal; widows: 2;
            word-spacing: 0px; -webkit-text-size-adjust: auto;
            -webkit-text-stroke-width: 0px; ">
        </blockquote>
        <div><br>
        </div>
        <div>One problem with that is if the thread_id gets reused for a
          new thread quickly after the old thread terminates. This is
          perhps ulikely, but could happen.</div>
        <br>
        <blockquote type="cite"><span style="font-family: Helvetica;
            font-size: medium; font-style: normal; font-variant: normal;
            font-weight: normal; letter-spacing: normal; line-height:
            normal; orphans: 2; text-align: -webkit-auto; text-indent:
            0px; text-transform: none; white-space: normal; widows: 2;
            word-spacing: 0px; -webkit-text-size-adjust: auto;
            -webkit-text-stroke-width: 0px; display: inline !important;
            float: none; ">Or we could block the creating thread from
            fully exiting until the VM op executes.</span></blockquote>
        <br>
      </div>
      <div>That would introduce a lot more synchronization and state to
        keep track of.</div>
      <div><br>
      </div>
    </blockquote>
    I think we could do it with a reference count on the thread, a wait
    in thread exit, and a notify in the VM thread.<br>
    We have a similar dangling pointer problem with JVMTI (7154963), and
    a reference count should solve that<br>
    problem as well.<br>
    <br>
    dl<br>
    <br>
    <blockquote
      cite="mid:DFF2B5A8-F847-41E0-89C4-2A06C2EACB9D@oracle.com"
      type="cite">
      <div>/Staffan</div>
      <br>
    </blockquote>
    <br>
  </body>
</html>