mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-05-11 14:32:58 +02:00
refactor: use std::string for thread names
This commit is contained in:
@@ -10,10 +10,12 @@
|
||||
|
||||
#include <exception>
|
||||
#include <functional>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
void util::TraceThread(const char* thread_name, std::function<void()> thread_func)
|
||||
void util::TraceThread(std::string_view thread_name, std::function<void()> thread_func)
|
||||
{
|
||||
util::ThreadRename(thread_name);
|
||||
util::ThreadRename(std::string{thread_name});
|
||||
try {
|
||||
LogPrintf("%s thread start\n", thread_name);
|
||||
thread_func();
|
||||
|
||||
Reference in New Issue
Block a user