- better logging

- minor cleanups
This commit is contained in:
2020-04-09 20:59:43 +03:00
parent 8bea9f4455
commit 762eb9ca33
3 changed files with 16 additions and 6 deletions
+5 -1
View File
@@ -48,7 +48,11 @@ long SyncHelper::increment(long *value)
void ThreadHelper::setName(const std::string &name)
{
#if defined(TARGET_LINUX)
pthread_setname_np(pthread_self(), name.c_str());
int retcode = pthread_setname_np(pthread_self(), name.c_str());
if (retcode != 0)
{
std::cerr << "Failed to set Linux thread name" << std::endl;
}
#endif
}