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:
paulc 2009-12-17 13:35:18 +00:00
parent edd9b63274
commit 0e9eca77ab
1 changed files with 2 additions and 1 deletions

View File

@ -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()