From 6c5070d9157ab0de667568655f0bbeb60780d701 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Sat, 8 Aug 2020 18:25:48 -0700 Subject: 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. --- src/core/timer.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/core/timer.c') diff --git a/src/core/timer.c b/src/core/timer.c index ad47ae33..36024817 100644 --- a/src/core/timer.c +++ b/src/core/timer.c @@ -1,5 +1,5 @@ // -// Copyright 2018 Staysail Systems, Inc. +// Copyright 2020 Staysail Systems, Inc. // Copyright 2018 Capitar IT Group BV // // This software is supplied under the terms of the MIT License, a @@ -136,6 +136,8 @@ nni_timer_loop(void *arg) nni_time now; nni_timer_node *node; + nni_thr_set_name(NULL, "nng:timer"); + for (;;) { nni_mtx_lock(&timer->t_mx); timer->t_active = NULL; -- cgit v1.2.3-70-g09d2