mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07: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
28214d181e
commit
9c2985603c
@ -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