Give threads a recognisable name to aid in debugging
NOTE: These thread names are visible in gdb when using 'info threads'.
Additionally both 'top' and 'ps' show these names *unless* told to
display the command-line instead of task name.
Signed-off-by: Giel van Schijndel <me@mortis.eu>
This commit is contained in:
@@ -53,6 +53,10 @@ void Shutdown(void* parg)
|
||||
{
|
||||
static CCriticalSection cs_Shutdown;
|
||||
static bool fTaken;
|
||||
|
||||
// Make this thread recognisable as the shutdown thread
|
||||
RenameThread("bitcoin-shutoff");
|
||||
|
||||
bool fFirstThread = false;
|
||||
{
|
||||
TRY_LOCK(cs_Shutdown, lockShutdown);
|
||||
|
||||
Reference in New Issue
Block a user