Browse Source

Fix UNIX-specific thread handle leak.

pull/1/head
JoelKatz 11 years ago
parent
commit
67ed7d9d49
  1. 3
      src/util.h

3
src/util.h

@ -623,7 +623,10 @@ inline pthread_t CreateThread(void(*pfn)(void*), void* parg, bool fWantHandle=fa @@ -623,7 +623,10 @@ inline pthread_t CreateThread(void(*pfn)(void*), void* parg, bool fWantHandle=fa
return (pthread_t)0;
}
if (!fWantHandle)
{
pthread_detach(hthread);
return (pthread_t)-1;
}
return hthread;
}

Loading…
Cancel
Save