A thread-local name. More...
#include <ThreadName.hpp>
Static Public Member Functions | |
static const std::string & | getName () |
Get the name of the calling thread. More... | |
static void | setName (const std::string &name) |
Set the name of the calling thread. More... | |
A thread-local name.
This implementation is very simple and only allows access to the thread name from the thread itself. It exists mainly to support logging, but may be used for other applications that do not need to access the names of other threads.
It is the responsibility of the end developer to ensure the same name is not used for multiple threads.
|
static |
Get the name of the calling thread.
|
static |
Set the name of the calling thread.