git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@956 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale 2006-03-28 20:12:05 +00:00
parent 1fe0f26046
commit edaa6870e8
1 changed files with 4 additions and 1 deletions

View File

@ -45,6 +45,7 @@ JThread::~JThread()
int JThread::Start() int JThread::Start()
{ {
int status; int status;
pthread_attr_t attr;
if (!mutexinit) if (!mutexinit)
{ {
@ -75,7 +76,9 @@ int JThread::Start()
runningmutex.Unlock(); runningmutex.Unlock();
continuemutex.Lock(); continuemutex.Lock();
status = pthread_create(&threadid,NULL,TheThread,this); pthread_attr_init(&attr);
pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
status = pthread_create(&threadid,&attr,TheThread,this);
if (status != 0) if (status != 0)
{ {
continuemutex.Unlock(); continuemutex.Unlock();