Browse Source

Removed ineffective and error-prone killthread in thread destructor

[email protected] 15 years ago
parent
commit
140d3866a3
1 changed files with 0 additions and 10 deletions
  1. 0 10
      src/modules/thread/sdl/Thread.cpp

+ 0 - 10
src/modules/thread/sdl/Thread.cpp

@@ -193,16 +193,6 @@ namespace sdl
 		if (data)
 		if (data)
 			delete[] data;
 			delete[] data;
 		delete comm;
 		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);
 		module->unregister(name);
 		SDL_DestroyMutex(mutex);
 		SDL_DestroyMutex(mutex);
 		SDL_DestroyCond(cond);
 		SDL_DestroyCond(cond);