Fixed a rare race condition triggered when a thread is dequeued while another is having its name checked
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@2902 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
@@ -141,8 +141,8 @@ UnQueueThread (TrueThread thread)
|
||||
{
|
||||
volatile TrueThread *ptr;
|
||||
|
||||
ptr = &threadQueue;
|
||||
SDL_mutexP (threadQueueMutex);
|
||||
ptr = &threadQueue;
|
||||
while (*ptr != thread)
|
||||
{
|
||||
#ifdef DEBUG_THREADS
|
||||
@@ -166,8 +166,8 @@ FindThreadInfo (Uint32 threadID)
|
||||
{
|
||||
TrueThread ptr;
|
||||
|
||||
ptr = threadQueue;
|
||||
SDL_mutexP (threadQueueMutex);
|
||||
ptr = threadQueue;
|
||||
while (ptr)
|
||||
{
|
||||
if (SDL_GetThreadID (ptr->native) == threadID)
|
||||
|
||||
Reference in New Issue
Block a user