Re-introduce thread names (they got lost in a refactor)

This commit is contained in:
Francesco Mazzoli
2024-01-11 17:32:37 +00:00
parent c80c6269d9
commit d569bdb494

View File

@@ -47,6 +47,12 @@ static void* startLoop(void* rawLoop) {
throw EXPLICIT_SYSCALL_EXCEPTION(ret, "pthread_sigmask");
}
}
{
int ret = pthread_setname_np(pthread_self(), loop->name().c_str());
if (ret != 0) {
throw EXPLICIT_SYSCALL_EXCEPTION(ret, "pthread_setname_np");
}
}
loop->run();
return nullptr;
}