|
Boost Users : |
From: Marco Guest (marcoguest71_at_[hidden])
Date: 2021-06-09 13:42:10
Hello,
I'm looking to set custom names to std::threads started indirectly when
using boost:asio library (on Linux operating system).
I have seen this stack trace for such thread by gdb:
pthread_cond_wait () from /lib64/libpthread.so.0
void
boost::asio::detail::posix_event::wait<boost::asio::detail::conditionally_enabled_mutex::scoped_lock>(boost::asio::detail::conditionally_enabled_mutex::scoped_lock&)
()2
boost::asio::detail::conditionally_enabled_event::wait(boost::asio::detail::conditionally_enabled_mutex::scoped_lock&)
()
boost::asio::detail::scheduler::do_run_one(boost::asio::detail::conditionally_enabled_mutex::scoped_lock&,
boost::asio::detail::scheduler_thread_info&, boost::system::error_code
const&) ()
boost::asio::detail::scheduler::run(boost::system::error_code&) ()
boost::asio::detail::resolver_service_base::work_scheduler_runner::operator()()
()
boost::asio::detail::posix_thread::func<boost::asio::detail::resolver_service_base::work_scheduler_runner>::run()
()
boost_asio_detail_posix_thread_function ()
start_thread () from /lib64/libpthread.so.0
clone () from /lib64/libc.so.6
Setting names would be useful to debug my application behaviour in high
throughput conditions and to be able to easily check the CPU usage of each
thread using âtop âHâ.
Is there a way to do so?
Thanks
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net