Add pthread_detach()'s for threads we never pthread_join(). Helps

reduce diagnostic noise for ThreadSanitizer.

Fixes https://github.com/NVIDIA/nccl/issues/649
This commit is contained in:
John Bachan
2022-03-14 17:09:08 -07:00
szülő 3c223c105a
commit 44eb40da0e
3 fájl változott, egészen pontosan 3 új sor hozzáadva és 0 régi sor törölve
+1
Fájl megtekintése
@@ -165,6 +165,7 @@ ncclResult_t bootstrapCreateRoot(ncclUniqueId* id, bool idFromEnv) {
memcpy(id, &listenSock->addr, sizeof(union ncclSocketAddress));
pthread_t thread;
pthread_create(&thread, NULL, bootstrapRoot, (void*)listenSock);
pthread_detach(thread); // will not be pthread_join()'d
ncclSetThreadName(thread, "NCCL BootstrapR");
return ncclSuccess;
}