mirror of
https://github.com/zeromq/libzmq.git
synced 2025-11-08 06:42:57 +01:00
Problem: ZMQ background threads are unnamed
Solution: use pthread API to set the name. For now call every thread "ZMQ b/g thread". Would be nice to number the I/O threads and name explicitly the reaper thread, but in reality a bit of internal API churn would be necessary, so perhaps it's not worth it. This is useful when debugging a process with many threads.
This commit is contained in:
@@ -412,6 +412,7 @@ void zmq::ctx_t::start_thread (thread_t &thread_, thread_fn *tfn_, void *arg_) c
|
||||
{
|
||||
thread_.start(tfn_, arg_);
|
||||
thread_.setSchedulingParameters(thread_priority, thread_sched_policy);
|
||||
thread_.setThreadName ("ZMQ b/g thread");
|
||||
}
|
||||
|
||||
void zmq::ctx_t::send_command (uint32_t tid_, const command_t &command_)
|
||||
|
||||
Reference in New Issue
Block a user