<html>
    <head>
      <base href="https://bugs.webkit.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [WTF] Introduce Thread class and use RefPtr&lt;Thread&gt; and align Windows Threading implementation semantics to Pthread one"
   href="https://bugs.webkit.org/show_bug.cgi?id=170502">170502</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[WTF] Introduce Thread class and use RefPtr&lt;Thread&gt; and align Windows Threading implementation semantics to Pthread one
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>WebKit
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>WebKit Nightly Build
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Unspecified
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Unspecified
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>Normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P2
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Web Template Framework
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>webkit-unassigned&#64;lists.webkit.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>utatane.tea&#64;gmail.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Currently, Windows Threading implementation is largely different. For example, once the thread is detached, we cannot do anything in Windows threading implementation. However, in Pthread Threading implementation, we can take various information and we can do several operations since the thread still remains in ThreadMap.

In this bug, we would like to introduce RefPtr&lt;Thread&gt; class instead of ThreadIdentifier. Even if the actual thread is dead, RefPtr&lt;Thread&gt; is valid and we can still get various information (like, thread is already dead).
And Thread class should have various useful methods, like suspend and resume. They should be carried from JSC's heap/.

And by using RefPtr&lt;Thread&gt;, we can drop ThreadMap. Currently, we always need to look up the platform thread information from the hash map. Instead, RefPtr&lt;Thread&gt; holds this information. And RefPtr&lt;Thread&gt;'s actual thread lifetime is managed by thread exit handler registered by using ThreadSpecific&lt;&gt; thing, which is similar to the current ThreadIdentifierDataPthreads.cpp.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>