display thread counts on app shutdown / ftp server startup and shutdown only in verbose mode

This commit is contained in:
Mark Vejvoda
2011-10-18 14:01:55 +00:00
parent 52c6fb1651
commit 9d1617e045
2 changed files with 6 additions and 2 deletions

View File

@@ -155,13 +155,13 @@ static void cleanupProcessObjects() {
SystemFlags::Close();
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);
for(;Thread::getThreadList().size() > 0 &&
difftime(time(NULL),elapsed) <= 10;) {
//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);
//deleteMapValues(crcPlayerTextureCache.begin(),crcPlayerTextureCache.end());