- bugfix for unit selection segfault on game exit

- added thread hardening to try to ensure we never try to delete a thread more than once.
This commit is contained in:
Mark Vejvoda
2012-04-12 20:43:19 +00:00
parent 76c3fa1949
commit 9aca26a0f0
5 changed files with 73 additions and 11 deletions

View File

@@ -15,6 +15,7 @@
#include "leak_dumper.h"
#include "thread.h"
#include <string>
#include <map>
using namespace Shared::Platform;
using namespace std;
@@ -41,6 +42,10 @@ protected:
Mutex mutexExecutingTask;
bool executingTask;
void *ptr;
static Mutex mutexMasterThreadList;
static std::map<void *,int> masterThreadList;
bool quit;
bool running;
string uniqueID;
@@ -90,6 +95,8 @@ public:
T * getGenericData() { return genericData; }
template <typename T>
void setGenericData(T *value) { genericData = value; }
static bool isThreadDeleted(void *ptr);
};
class RunningStatusSafeWrapper {