mirror of
https://github.com/glest/glest-source.git
synced 2025-08-12 11:24:00 +02:00
- 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:
@@ -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 {
|
||||
|
Reference in New Issue
Block a user