<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body><span class="vcard"><a class="email" href="mailto:zan@falconsigh.net" title="Zan Dobersek <zan@falconsigh.net>"> <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@falconsigh.net" title="Zan Dobersek <zan@falconsigh.net>"> <span class="fn">Zan Dobersek</span></a>
</span></b>
<pre>Comment on <span class=""><a href="attachment.cgi?id=284569&action=diff" name="attach_284569" title="Another approach">attachment 284569</a> <a href="attachment.cgi?id=284569&action=edit" title="Another approach">[details]</a></span>
Another approach
View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=284569&action=review">https://bugs.webkit.org/attachment.cgi?id=284569&action=review</a>
Looks good, thanks for reiterating on this.
<span class="quote">> Source/WebKit2/Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.cpp:94
> + WorkQueue& getOrCreateWorkQueueForContext(void* context)
> + {
> + auto addResult = m_workQueueMap.add(context, nullptr);
> + if (addResult.isNewEntry) {
> + if (m_threadCount >= m_threadCountLimit) {
> + RELEASE_ASSERT(m_sharedWorkQueue);
> + addResult.iterator->value = m_sharedWorkQueue;
> + } else {
> + addResult.iterator->value = WorkQueue::create("org.webkit.ThreadedCompositorWorkQueue");
> + if (!m_threadCount)
> + m_sharedWorkQueue = addResult.iterator->value;
> + m_threadCount++;
> + }
> + }</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>