Bug 1195767 - part 5 - use signaling instead of broadcast when work items are placed in nsEventQueue; r=gerald, a=sledru

There's no reason to wake up all the threads in a thread pool when one
item gets placed in the queue.  Waking up one will serve the same
purpose and is significantly more efficient for thread pools with large
numbers of threads.

--HG--
extra : source : 9eaa5be9131856e1c1bc4c4af74ad531400910b0
This commit is contained in:
Nathan Froyd 2015-09-03 16:38:18 -04:00
Родитель e2167b1404
Коммит 358d1603a2
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -132,7 +132,7 @@ nsEventQueueBase<MonitorType>::PutEvent(
queueLocation = aRunnable.take();
++mOffsetTail;
LOG(("EVENTQ(%p): notify\n", this));
aProofOfLock.NotifyAll();
aProofOfLock.Notify();
}
template void nsEventQueueBase<Monitor>::PutEvent(already_AddRefed<nsIRunnable>&& aRunnable,