Explicitely idle the Qt client thread ourselves, do not rely on QTimer since the glib event scheduler eats much CPU for short timeouts.
Fixes a nearly 100% CPU load that happened for Qt linked with glib, almost all recent Linux distributions. git-svn-id: http://voip.null.ro/svn/yate@2989 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
parent
edd9b63274
commit
0e9eca77ab
|
@ -2891,7 +2891,7 @@ QtEventProxy::QtEventProxy(Type type, QApplication* app)
|
|||
QTimer* timer = new QTimer(this);
|
||||
timer->setObjectName("qtClientIdleTimer");
|
||||
QtClient::connectObjects(timer,SIGNAL(timeout()),this,SLOT(timerTick()));
|
||||
timer->start(1);
|
||||
timer->start(0);
|
||||
}
|
||||
break;
|
||||
case AllHidden:
|
||||
|
@ -2909,6 +2909,7 @@ void QtEventProxy::timerTick()
|
|||
{
|
||||
if (Client::self())
|
||||
Client::self()->idleActions();
|
||||
Thread::idle();
|
||||
}
|
||||
|
||||
void QtEventProxy::allHidden()
|
||||
|
|
Loading…
Reference in New Issue