Removed ineffective and error-prone killthread in thread destructor

This commit is contained in:
bart@bartbes.ath.cx
2010-05-23 15:36:49 +02:00
parent 200d4bc653
commit 140d3866a3
-10
View File
@@ -193,16 +193,6 @@ namespace sdl
if (data)
delete[] data;
delete comm;
if (handle)
{
bool inGC = (_gcthread == SDL_GetThreadID(handle));
bool collectSelf = (inGC && _gcthread == SDL_ThreadID());
inGC = inGC && !collectSelf;
if (inGC) SDL_mutexP((SDL_mutex *) _gcmutex);
if (collectSelf) SDL_mutexV((SDL_mutex *) _gcmutex);
SDL_KillThread(handle);
if (inGC) SDL_mutexV((SDL_mutex *) _gcmutex);
}
module->unregister(name);
SDL_DestroyMutex(mutex);
SDL_DestroyCond(cond);