dont cancel main thread
This commit is contained in:
1 parent
f727d33dda
commit
73419a9d4b
1 file changed
+3
-1
@@ -88,7 +88,9 @@ static void myAtExit(void)
|
||||
semMutexMustTake(listMutex);
|
||||
pthreadInfo=(threadInfo *)ellFirst(&pthreadList);
|
||||
while(pthreadInfo) {
|
||||
pthread_cancel(pthreadInfo->tid);
|
||||
if(pthreadInfo->createFunc){// dont cancel main thread
|
||||
pthread_cancel(pthreadInfo->tid);
|
||||
}
|
||||
pthreadInfo=(threadInfo *)ellNext(&pthreadInfo->node);
|
||||
}
|
||||
semMutexGive(listMutex);
|
||||
|
||||
Reference in new issue
Block a user