In PR_JoinThread, we need to call pthread_detach after pthread_join
under DCE threads because DCE threads' pthread_detach does not reclaim the terminated thread's resources.
This commit is contained in:
Родитель
e4b718adf4
Коммит
5a7ec536c0
|
@ -478,6 +478,10 @@ PR_IMPLEMENT(PRStatus) PR_JoinThread(PRThread *thred)
|
|||
PR_ASSERT(rv == 0 && result == NULL);
|
||||
if (0 == rv)
|
||||
{
|
||||
#ifdef _PR_DCETHREADS
|
||||
rv = pthread_detach(&id);
|
||||
PR_ASSERT(0 == rv);
|
||||
#endif
|
||||
_pt_thread_death(thred);
|
||||
}
|
||||
else
|
||||
|
|
Загрузка…
Ссылка в новой задаче