![]() |
Bitcoin Core 30.99.0
P2P Digital Currency
|
#include <cstring>#include <string>#include <thread>#include <utility>#include <util/threadnames.h>Go to the source code of this file.
Functions | |
| static void | SetThreadName (const char *name) |
| Set the thread's name at the process level. More... | |
| static void | SetInternalName (const std::string &name) |
| Set the in-memory internal name for this thread. More... | |
Variables | |
| static thread_local char | g_thread_name [128] {'\0'} |
| The name of the thread. More... | |
|
static |
Set the in-memory internal name for this thread.
Does not affect the process name.
Definition at line 48 of file threadnames.cpp.
|
static |
Set the thread's name at the process level.
Does not affect the internal name.
Definition at line 23 of file threadnames.cpp.
|
static |
The name of the thread.
We use char array instead of std::string to avoid complications with running a destructor when the thread exits. Avoid adding other thread_local variables.
Definition at line 44 of file threadnames.cpp.