mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 23:02:20 +00:00
Bug 1195767 - part 5 - use signaling instead of broadcast when work items are placed in nsEventQueue; r=gerald
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.
This commit is contained in:
parent
8502eaeea7
commit
17c37f82b5
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user