diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-07-20 04:49:55 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-07-20 04:49:55 +0000 |
commit | ab1bb5b7f1c3c3a7b240ab7fc8661459ecd7decb (patch) | |
tree | 7a900833aad3ccc685712c6c2a7d87576d54f427 /daemon/event_loop.c | |
parent | Adding upstream version 1.40.1. (diff) | |
download | netdata-upstream/1.41.0.tar.xz netdata-upstream/1.41.0.zip |
Adding upstream version 1.41.0.upstream/1.41.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | daemon/event_loop.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/daemon/event_loop.c b/daemon/event_loop.c index 5fd02377..fb387915 100644 --- a/daemon/event_loop.c +++ b/daemon/event_loop.c @@ -56,5 +56,10 @@ void register_libuv_worker_jobs() { // netdatacli worker_register_job_name(UV_EVENT_SCHEDULE_CMD, "schedule command"); - uv_thread_set_name_np(pthread_self(), "LIBUV_WORKER"); + static int workers = 0; + int worker_id = __atomic_add_fetch(&workers, 1, __ATOMIC_RELAXED); + + char buf[NETDATA_THREAD_TAG_MAX + 1]; + snprintfz(buf, NETDATA_THREAD_TAG_MAX, "UV_WORKER[%d]", worker_id); + uv_thread_set_name_np(pthread_self(), buf); } |