scheduler should not run at 100% CPU any more

This commit is contained in:
nebojsa 2008-12-17 01:34:40 +00:00
parent 1e0f91befc
commit 7988cd5e1d
1 changed files with 4 additions and 1 deletions

View File

@ -311,8 +311,11 @@ XmlRpcDaemon :: startup (void) throw (std::logic_error)
GMainContext* maincontext = g_main_context_default();
while(active)
{
g_main_context_iteration(maincontext, FALSE);
while (active && g_main_context_pending (maincontext)) {
g_main_context_iteration(maincontext, FALSE);
}
xmlRpcServer->work(0.);
g_usleep(G_USEC_PER_SEC/20);
}
// xmlRpcServer->work(-1.0);