- bug fixes for new thread manager when in game lobby

This commit is contained in:
Mark Vejvoda
2013-01-12 04:40:44 +00:00
parent 1a49588a45
commit 90ad8581d7
2 changed files with 126 additions and 112 deletions

View File

@@ -484,6 +484,7 @@ void MasterSlaveThreadController::triggerMaster(int waitMilliseconds) {
MutexSafeWrapper safeMutex(mutex);
if(debugMasterSlaveThreadController) printf("In [%s::%s Line: %d] semVal = %u\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,slaveTriggerCounter);
//printf("In [%s::%s Line: %d] semVal = %u\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,slaveTriggerCounter);
slaveTriggerCounter--;
int newCount = slaveTriggerCounter;
@@ -492,6 +493,8 @@ void MasterSlaveThreadController::triggerMaster(int waitMilliseconds) {
safeMutex.ReleaseLock();
//printf("In [%s::%s Line: %d] semVal = %u\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,slaveTriggerCounter);
if(newCount <= triggerBaseCount) {
slaveTriggerSem->signal();
}