![]() |
Bitcoin Core 31.0.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. | |
| static void | SetInternalName (const std::string &name) |
| Set the in-memory internal name for this thread. | |
Variables | |
| static thread_local char | g_thread_name [128] {'\0'} |
| The name of the thread. | |
Set the in-memory internal name for this thread.
Does not affect the process name.
Definition at line 48 of file threadnames.cpp.
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.