mirror of
https://github.com/glest/glest-source.git
synced 2025-08-23 00:12:49 +02:00
attempt to fix a thread bug when starting a game
This commit is contained in:
@@ -117,8 +117,8 @@ public:
|
||||
|
||||
void setOverrideShutdownTask(taskFunctionCallback *ptr);
|
||||
|
||||
bool getSimpleTaskInterfaceValid() const { return this->simpleTaskInterfaceValid; }
|
||||
void setSimpleTaskInterfaceValid(bool value) { this->simpleTaskInterfaceValid = value; }
|
||||
bool getSimpleTaskInterfaceValid();
|
||||
void setSimpleTaskInterfaceValid(bool value);
|
||||
};
|
||||
|
||||
// =====================================================
|
||||
|
@@ -427,6 +427,19 @@ bool SimpleTaskThread::canShutdown(bool deleteSelfIfShutdownDelayed) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
bool SimpleTaskThread::getSimpleTaskInterfaceValid() {
|
||||
string mutexOwnerId1 = string(__FILE__) + string("_") + intToStr(__LINE__);
|
||||
MutexSafeWrapper safeMutex1(&mutexSimpleTaskInterfaceValid,mutexOwnerId1);
|
||||
|
||||
return this->simpleTaskInterfaceValid;
|
||||
}
|
||||
void SimpleTaskThread::setSimpleTaskInterfaceValid(bool value) {
|
||||
string mutexOwnerId1 = string(__FILE__) + string("_") + intToStr(__LINE__);
|
||||
MutexSafeWrapper safeMutex1(&mutexSimpleTaskInterfaceValid,mutexOwnerId1);
|
||||
|
||||
this->simpleTaskInterfaceValid = value;
|
||||
}
|
||||
|
||||
void SimpleTaskThread::execute() {
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
void *ptr_cpy = this->ptr;
|
||||
|
Reference in New Issue
Block a user