Commit 79ff5ead authored by wolfgang's avatar wolfgang
Browse files

[project @ 2003-09-19 18:56:00 by wolfgang]

POSIX threads should be pthread_detach-ed after they are created.
Otherwise they'll stick around waiting for a pthread_join.

(This wasn't really a problem because our worker threads never exit anyway).
parent 14b10077
......@@ -78,7 +78,10 @@ startProcWrapper(void* pProc)
int
createOSThread ( OSThreadId* pId, void (*startProc)(void))
{
return pthread_create(pId, NULL, startProcWrapper, (void*)startProc);
int result = pthread_create(pId, NULL, startProcWrapper, (void*)startProc);
if(!result)
pthread_detach(*pId);
return result;
}
OSThreadId
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment