<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:zan&#64;falconsigh.net" title="Zan Dobersek &lt;zan&#64;falconsigh.net&gt;"> <span class="fn">Zan Dobersek</span></a>
</span> changed
              <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [Threaded Compositor] Crashes and deadlocks in single web process mode"
   href="https://bugs.webkit.org/show_bug.cgi?id=160160">bug 160160</a>
        <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Attachment #284569 Flags</td>
           <td>review?
           </td>
           <td>review+
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [Threaded Compositor] Crashes and deadlocks in single web process mode"
   href="https://bugs.webkit.org/show_bug.cgi?id=160160#c15">Comment # 15</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [Threaded Compositor] Crashes and deadlocks in single web process mode"
   href="https://bugs.webkit.org/show_bug.cgi?id=160160">bug 160160</a>
              from <span class="vcard"><a class="email" href="mailto:zan&#64;falconsigh.net" title="Zan Dobersek &lt;zan&#64;falconsigh.net&gt;"> <span class="fn">Zan Dobersek</span></a>
</span></b>
        <pre>Comment on <span class=""><a href="attachment.cgi?id=284569&amp;action=diff" name="attach_284569" title="Another approach">attachment 284569</a> <a href="attachment.cgi?id=284569&amp;action=edit" title="Another approach">[details]</a></span>
Another approach

View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=284569&amp;action=review">https://bugs.webkit.org/attachment.cgi?id=284569&amp;action=review</a>

Looks good, thanks for reiterating on this.

<span class="quote">&gt; Source/WebKit2/Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.cpp:94
&gt; +    WorkQueue&amp; getOrCreateWorkQueueForContext(void* context)
&gt; +    {
&gt; +        auto addResult = m_workQueueMap.add(context, nullptr);
&gt; +        if (addResult.isNewEntry) {
&gt; +            if (m_threadCount &gt;= m_threadCountLimit) {
&gt; +                RELEASE_ASSERT(m_sharedWorkQueue);
&gt; +                addResult.iterator-&gt;value = m_sharedWorkQueue;
&gt; +            } else {
&gt; +                addResult.iterator-&gt;value = WorkQueue::create(&quot;org.webkit.ThreadedCompositorWorkQueue&quot;);
&gt; +                if (!m_threadCount)
&gt; +                    m_sharedWorkQueue = addResult.iterator-&gt;value;
&gt; +                m_threadCount++;
&gt; +            }
&gt; +        }</span >

This is OK for now, and it works for a single-thread limit. But for configurations where more (but not unlimited) threads could be used, one option would be to use a HashSet here and disperse the contexts across the available threads. But that's for the future.</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>