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:
@@ -3594,6 +3594,9 @@ void static BitcoinMiner(CWallet *pwallet)
|
||||
printf("BitcoinMiner started\n");
|
||||
SetThreadPriority(THREAD_PRIORITY_LOWEST);
|
||||
|
||||
// Make this thread recognisable as the mining thread
|
||||
RenameThread("bitcoin [miner]");
|
||||
|
||||
// Each thread has its own key and counter
|
||||
CReserveKey reservekey(pwallet);
|
||||
unsigned int nExtraNonce = 0;
|
||||
|
||||
Reference in New Issue
Block a user