summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2021-08-28 04:31:39 -0700
committerVito Caputo <vcaputo@pengaru.com>2021-08-28 04:31:39 -0700
commit10b241f9b04e266fd4d7c76aefd70d9a33af9633 (patch)
tree7998d8a74a673c9ee035e0d32f7fa7ac16cdf8be
parent74ff0a14d737974f9e38b46130b2318f70ccd996 (diff)
iou: give async worker threads a name
Make them more easily identifiable in monitoring/profiling tools
-rw-r--r--src/iou.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/iou.c b/src/iou.c
index 2be79ca..cdfc317 100644
--- a/src/iou.c
+++ b/src/iou.c
@@ -19,6 +19,7 @@
#include <pthread.h>
#include <stdlib.h>
#include <stddef.h>
+#include <sys/prctl.h>
#include "iou.h"
@@ -148,6 +149,7 @@ static void * iou_thread(iou_thread_t *thread)
assert(thread);
assert(thread->iou);
+ prctl(PR_SET_NAME, "libiou-async");
iou = thread->iou;
for (;;) {
© All Rights Reserved