Boost logo

Boost :

Subject: [boost] Adding an option to set the name of a boost::thread
From: david.hagood_at_[hidden]
Date: 2012-11-06 13:50:23

Has any thought been given to allowing a name to be set on a
boost::thread, such that (if the underlying implementation supports it)
that name would show up in things like top and ps?

In Linux, you can name a thread via the prctl() call and it will show up
in top - dandy for debugging which of the bazillion threads in my app has
decided to suck up all the CPU.

I don't know if Windows supports such a call, and IMHO it would be
acceptable if the call did nothing in such a case.

Ideally, I'd want to see it as a property, something like:

void boost::thread::set_name(std::string name)
std::string boost::thread::get_name() const;

Boost list run by bdawes at, gregod at, cpdaniel at, john at