mirror of
https://github.com/glest/glest-source.git
synced 2025-08-17 21:51:17 +02:00
display thread counts on app shutdown / ftp server startup and shutdown only in verbose mode
This commit is contained in:
@@ -155,13 +155,13 @@ static void cleanupProcessObjects() {
|
|||||||
SystemFlags::Close();
|
SystemFlags::Close();
|
||||||
SystemFlags::SHUTDOWN_PROGRAM_MODE=true;
|
SystemFlags::SHUTDOWN_PROGRAM_MODE=true;
|
||||||
|
|
||||||
printf("start running threads = %lu\n",Thread::getThreadList().size());
|
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("start running threads = %lu\n",Thread::getThreadList().size());
|
||||||
time_t elapsed = time(NULL);
|
time_t elapsed = time(NULL);
|
||||||
for(;Thread::getThreadList().size() > 0 &&
|
for(;Thread::getThreadList().size() > 0 &&
|
||||||
difftime(time(NULL),elapsed) <= 10;) {
|
difftime(time(NULL),elapsed) <= 10;) {
|
||||||
//sleep(0);
|
//sleep(0);
|
||||||
}
|
}
|
||||||
printf("end running threads = %lu\n",Thread::getThreadList().size());
|
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("end running threads = %lu\n",Thread::getThreadList().size());
|
||||||
|
|
||||||
std::map<int,Texture2D *> &crcPlayerTextureCache = CacheManager::getCachedItem< std::map<int,Texture2D *> >(GameConstants::playerTextureCacheLookupKey);
|
std::map<int,Texture2D *> &crcPlayerTextureCache = CacheManager::getCachedItem< std::map<int,Texture2D *> >(GameConstants::playerTextureCacheLookupKey);
|
||||||
//deleteMapValues(crcPlayerTextureCache.begin(),crcPlayerTextureCache.end());
|
//deleteMapValues(crcPlayerTextureCache.begin(),crcPlayerTextureCache.end());
|
||||||
|
@@ -64,6 +64,8 @@ FTPServerThread::FTPServerThread(std::pair<string,string> mapsPath,
|
|||||||
|
|
||||||
ftpInit(&FindExternalFTPServerIp,&UPNP_Tools::AddUPNPPortForward,&UPNP_Tools::RemoveUPNPPortForward, &isValidClientType);
|
ftpInit(&FindExternalFTPServerIp,&UPNP_Tools::AddUPNPPortForward,&UPNP_Tools::RemoveUPNPPortForward, &isValidClientType);
|
||||||
VERBOSE_MODE_ENABLED = SystemFlags::VERBOSE_MODE_ENABLED;
|
VERBOSE_MODE_ENABLED = SystemFlags::VERBOSE_MODE_ENABLED;
|
||||||
|
|
||||||
|
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("***FTP SERVER STARTED [%p]\n",this);
|
||||||
}
|
}
|
||||||
|
|
||||||
FTPServerThread::~FTPServerThread() {
|
FTPServerThread::~FTPServerThread() {
|
||||||
@@ -77,6 +79,8 @@ FTPServerThread::~FTPServerThread() {
|
|||||||
UPNP_Tools::upnp_rem_redirect(ServerSocket::getFTPServerPort() + clientIndex);
|
UPNP_Tools::upnp_rem_redirect(ServerSocket::getFTPServerPort() + clientIndex);
|
||||||
}
|
}
|
||||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||||
|
|
||||||
|
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("***FTP SERVER ENDED [%p]\n",this);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FTPServerThread::signalQuit() {
|
void FTPServerThread::signalQuit() {
|
||||||
|
Reference in New Issue
Block a user