From 140d3866a31a3a51f19cb5fa964a1bb6e6afb1a4 Mon Sep 17 00:00:00 2001 From: "bart@bartbes.ath.cx" Date: Sun, 23 May 2010 15:36:49 +0200 Subject: [PATCH] Removed ineffective and error-prone killthread in thread destructor --- src/modules/thread/sdl/Thread.cpp | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/modules/thread/sdl/Thread.cpp b/src/modules/thread/sdl/Thread.cpp index 0ed826f8c..648012c55 100644 --- a/src/modules/thread/sdl/Thread.cpp +++ b/src/modules/thread/sdl/Thread.cpp @@ -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);