Beispiel #1
0
void GDynamicPageServer::go()
{
	GSignalHandler sh;
	while(m_bKeepGoing && sh.check() == 0)
	{
		if(!process())
			GThread::sleep(100);
	}
	onShutDown();
}
void GDynamicPageServer::go()
{
	double dLastMaintenance = GTime::seconds();
	GSignalHandler sh;
	while(m_bKeepGoing && sh.check() == 0)
	{
		if(!process())
		{
			if(GTime::seconds() - dLastMaintenance > 14400)	// 4 hours
			{
				doMaintenance();
				dLastMaintenance = GTime::seconds();
			}
			else
				GThread::sleep(100);
		}
	}
	onShutDown();
}