MT#55831 sems-* constant 10% CPU usage in idle Virtual environment vagrant/vmware

sems-* constant 10% CPU usage in idle Virtual environment vagrant/vmware
DBRegagent loop sleep replaced with waitForEvent() call
(real ticket number: TT#52455)

Change-Id: Id2e280a18b33ae3e11daef72711af325ad3b8364
mr11.2.1
Roman Romanchenko 4 years ago committed by Donat Zenichev
parent 6c054d35d1
commit 7452a32910

@ -897,9 +897,8 @@ void DBRegAgent::run() {
DBG("running DBRegAgent thread...\n");
shutdown_finished = false;
while (running) {
waitForEventTimed(500); // 500 milliseconds
processEvents();
usleep(1000); // 1ms
}
DBG("DBRegAgent done, removing all registrations from Event Dispatcher...\n");

@ -100,6 +100,11 @@ void AmEventQueue::waitForEvent()
ev_pending.wait_for();
}
void AmEventQueue::waitForEventTimed(unsigned long msec)
{
ev_pending.wait_for_to(msec);
}
void AmEventQueue::processSingleEvent()
{
m_queue.lock();

@ -80,6 +80,7 @@ public:
void postEvent(AmEvent*);
void processEvents();
void waitForEvent();
void waitForEventTimed(unsigned long msec);
void processSingleEvent();
bool eventPending();

Loading…
Cancel
Save