mirror of
https://github.com/glest/glest-source.git
synced 2025-02-25 04:02:30 +01:00
- attempt to get better stack trace if simple thread dies in destructor
This commit is contained in:
parent
246f4b326f
commit
7399d10247
@ -307,7 +307,19 @@ SimpleTaskThread::SimpleTaskThread( SimpleTaskCallbackInterface *simpleTaskInter
|
||||
}
|
||||
|
||||
SimpleTaskThread::~SimpleTaskThread() {
|
||||
this->simpleTaskInterface->shutdownTask(this);
|
||||
try {
|
||||
if(this->simpleTaskInterface != NULL) {
|
||||
this->simpleTaskInterface->shutdownTask(this);
|
||||
this->simpleTaskInterface = NULL;
|
||||
}
|
||||
}
|
||||
catch(const exception &ex) {
|
||||
SystemFlags::OutputDebug(SystemFlags::debugError,"In [%s::%s Line: %d] Error [%s]\n",__FILE__,__FUNCTION__,__LINE__,ex.what());
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] uniqueID [%s]\n",__FILE__,__FUNCTION__,__LINE__,this->getUniqueID().c_str());
|
||||
|
||||
//throw runtime_error(ex.what());
|
||||
abort();
|
||||
}
|
||||
}
|
||||
|
||||
bool SimpleTaskThread::isThreadExecutionLagging() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user