- bugfix for transifex tutorial download files now loaded into UI

- updated each thread to provide its name
This commit is contained in:
Mark Vejvoda
2013-05-21 20:28:42 +00:00
parent 5cfc4d07a0
commit 5b664fb1a2
20 changed files with 79 additions and 17 deletions

View File

@@ -31,6 +31,7 @@ FileCRCPreCacheThread::FileCRCPreCacheThread() : BaseThread() {
techDataPaths.clear();
workerThreadTechPaths.clear();
processTechCB = NULL;
uniqueID = "FileCRCPreCacheThread";
}
FileCRCPreCacheThread::FileCRCPreCacheThread(vector<string> techDataPaths,
@@ -39,6 +40,7 @@ FileCRCPreCacheThread::FileCRCPreCacheThread(vector<string> techDataPaths,
this->techDataPaths = techDataPaths;
this->workerThreadTechPaths = workerThreadTechPaths;
this->processTechCB = processTechCB;
uniqueID = "FileCRCPreCacheThread";
}
bool FileCRCPreCacheThread::canShutdown(bool deleteSelfIfShutdownDelayed) {
@@ -346,6 +348,7 @@ SimpleTaskThread::SimpleTaskThread( SimpleTaskCallbackInterface *simpleTaskInter
bool needTaskSignal) : BaseThread(),
simpleTaskInterface(NULL),
overrideShutdownTask(NULL) {
uniqueID = "SimpleTaskThread";
this->simpleTaskInterface = simpleTaskInterface;
this->executionCount = executionCount;
this->millisecsBetweenExecutions = millisecsBetweenExecutions;
@@ -525,6 +528,7 @@ bool SimpleTaskThread::getTaskSignalled() {
// -------------------------------------------------
LogFileThread::LogFileThread() : BaseThread() {
uniqueID = "LogFileThread";
logList.clear();
lastSaveToDisk = time(NULL);
static string mutexOwnerId = string(__FILE__) + string("_") + intToStr(__LINE__);

View File

@@ -517,6 +517,7 @@ void IRCThread::setEventDataDone(bool value) {
}
IRCThread::IRCThread(const std::vector<string> &argv, IRCCallbackInterface *callbackObj) : BaseThread() {
uniqueID = "IRCThread";
this->argv = argv;
this->callbackObj = callbackObj;
ircSession = NULL;

View File

@@ -242,6 +242,8 @@ FTPClientThread::FTPClientThread(int portNumber, string serverUrl,
string fileArchiveExtractCommandParameters,
int fileArchiveExtractCommandSuccessResult,
string tempFilesPath) : BaseThread() {
uniqueID = "FTPClientThread";
this->portNumber = portNumber;
this->serverUrl = serverUrl;
this->mapsPath = mapsPath;

View File

@@ -74,6 +74,8 @@ FTPServerThread::FTPServerThread(std::pair<string,string> mapsPath,
bool allowInternetTilesetFileTransfers, bool allowInternetTechtreeFileTransfers,
int portNumber, int maxPlayers,
FTPClientValidationInterface *ftpValidationIntf, string tempFilesPath) : BaseThread() {
uniqueID = "FTPServerThread";
this->mapsPath = mapsPath;
this->tilesetsPath = tilesetsPath;
this->techtreesPath = techtreesPath;

View File

@@ -2010,6 +2010,7 @@ BroadCastClientSocketThread::BroadCastClientSocketThread(DiscoveredServersInterf
if(SystemFlags::getSystemSettingType(SystemFlags::debugNetwork).enabled) SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
discoveredServersCB = cb;
uniqueID = "BroadCastClientSocketThread";
if(SystemFlags::getSystemSettingType(SystemFlags::debugNetwork).enabled) SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
}
@@ -2782,6 +2783,7 @@ BroadCastSocketThread::BroadCastSocketThread(int boundPort) : BaseThread() {
mutexPauseBroadcast = new Mutex();
setPauseBroadcast(false);
this->boundPort = boundPort;
uniqueID = "BroadCastSocketThread";
//printf("new broadcast thread [%p]\n",this);
}

View File

@@ -48,7 +48,8 @@ protected:
return false;
}
public:
ThreadGarbageCollector() : BaseThread() {
ThreadGarbageCollector() : BaseThread() {
uniqueID = "ThreadGarbageCollector";
removeThreadFromList();
}
virtual ~ThreadGarbageCollector() {