Implement thread name on windows, cleanup thread naming internals

This commit is contained in:
Romain Moret
2019-05-20 19:27:12 +02:00
parent 046ccfc408
commit 27005cc1ae
8 changed files with 75 additions and 34 deletions

View File

@@ -426,14 +426,10 @@ void zmq::thread_ctx_t::start_thread (thread_t &thread_,
_thread_affinity_cpus);
char namebuf[16] = "";
#ifdef ZMQ_HAVE_WINDOWS
LIBZMQ_UNUSED (name_);
#else
snprintf (namebuf, sizeof (namebuf), "%s%sZMQbg%s%s",
_thread_name_prefix.empty () ? "" : _thread_name_prefix.c_str (),
_thread_name_prefix.empty () ? "" : "/", name_ ? "/" : "",
name_ ? name_ : "");
#endif
thread_.start (tfn_, arg_, namebuf);
}