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/platform.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/core/platform.h') diff --git a/src/core/platform.h b/src/core/platform.h index c6f4ef30..6eff2f7d 100644 --- a/src/core/platform.h +++ b/src/core/platform.h @@ -157,6 +157,10 @@ extern void nni_plat_thr_fini(nni_plat_thr *); // prevention in callbacks, for example.) extern bool nni_plat_thr_is_self(nni_plat_thr *); +// nni_plat_thr_set_name is used to set the thread name, which +// should be a short ASCII string. It may or may not be supported -- +// this is intended to facilitate debugging. +extern void nni_plat_thr_set_name(nni_plat_thr *, const char *); // // Atomics support. This will evolve over time. // -- cgit v1.2.3-70-g09d2