forked from OSchip/llvm-project
call ::pthread_detach on llvm_execute_on_thread_impl
Fixes all TSAN bugs in clangd Reviewed By: sammccall Differential Revision: https://reviews.llvm.org/D83039
This commit is contained in:
parent
23eeae5526
commit
e0968ad459
|
@ -94,6 +94,10 @@ llvm_execute_on_thread_impl(void *(*ThreadFunc)(void *), void *Arg,
|
||||||
if ((errnum = ::pthread_join(Thread, nullptr)) != 0) {
|
if ((errnum = ::pthread_join(Thread, nullptr)) != 0) {
|
||||||
ReportErrnumFatal("pthread_join failed", errnum);
|
ReportErrnumFatal("pthread_join failed", errnum);
|
||||||
}
|
}
|
||||||
|
} else if (JP == JoiningPolicy::Detach) {
|
||||||
|
if ((errnum = ::pthread_detach(Thread)) != 0) {
|
||||||
|
ReportErrnumFatal("pthread_detach failed", errnum);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue