aboutsummaryrefslogtreecommitdiff
path: root/src/platform/posix/posix_resolv_gai.c
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2020-08-08 18:25:48 -0700
committerGarrett D'Amore <garrett@damore.org>2020-08-08 19:30:17 -0700
commit6c5070d9157ab0de667568655f0bbeb60780d701 (patch)
treeab1a03e16907c97e6d76f1d95d79aea0f4a875ce /src/platform/posix/posix_resolv_gai.c
parentddc0d044dd0fcf4aa1dc333fd5bda0de47850a64 (diff)
downloadnng-6c5070d9157ab0de667568655f0bbeb60780d701.tar.gz
nng-6c5070d9157ab0de667568655f0bbeb60780d701.tar.bz2
nng-6c5070d9157ab0de667568655f0bbeb60780d701.zip
fixes #960 NNG threads inherit application thread name
This also exposes an nng_thread_set_name() function for applications to use. All NNG thread names start with "nng:". Note that support is highly dependent on the operating system.
Diffstat (limited to 'src/platform/posix/posix_resolv_gai.c')
-rw-r--r--src/platform/posix/posix_resolv_gai.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/platform/posix/posix_resolv_gai.c b/src/platform/posix/posix_resolv_gai.c
index 88313045..1799935e 100644
--- a/src/platform/posix/posix_resolv_gai.c
+++ b/src/platform/posix/posix_resolv_gai.c
@@ -318,7 +318,9 @@ resolv_worker(void *unused)
NNI_ARG_UNUSED(unused);
- nni_mtx_lock(&resolv_mtx);
+ nni_thr_set_name(NULL, "nng:resolver");
+
+ nni_mtx_lock(&resolv_mtx);
for (;;) {
nni_aio * aio;
resolv_item *item;