mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-20 09:03:24 +00:00
Add thread names for debugging
This commit is contained in:
parent
07ff4dee54
commit
6f94f7b132
12 changed files with 32 additions and 14 deletions
|
|
@ -26,13 +26,7 @@
|
|||
/* **************************************************** */
|
||||
|
||||
static void* doRun(void* ptr) {
|
||||
#ifdef __APPLE__
|
||||
// Mac OS X: must be set from within the thread (can't specify thread ID)
|
||||
char buf[32];
|
||||
snprintf(buf, sizeof(buf), "ThreadPool worker");
|
||||
if(pthread_setname_np(buf))
|
||||
ntop->getTrace()->traceEvent(TRACE_WARNING, "Unable to set pthread name %s", buf);
|
||||
#endif
|
||||
Utils::setThreadName("TrPoolWorker");
|
||||
|
||||
((ThreadPool*)ptr)->run();
|
||||
return(NULL);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue