зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
e2167b1404
Коммит
358d1603a2
|
@ -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,
|
||||
|
|
Загрузка…
Ссылка в новой задаче