aboutsummaryrefslogtreecommitdiff
path: root/src/util/thread.cpp
diff options
context:
space:
mode:
authorstickies-v <stickies-v@protonmail.com>2022-08-31 16:30:35 +0100
committerstickies-v <stickies-v@protonmail.com>2022-09-13 19:07:39 +0100
commit97f5b20c12ca6ccf89d7720a5d41eaf4cda1b695 (patch)
treefee87877bc54e805480a708002716467e9a82652 /src/util/thread.cpp
parent29d540b7ada890dd588c4825d40c27c5e6f20061 (diff)
downloadbitcoin-97f5b20c12ca6ccf89d7720a5d41eaf4cda1b695.tar.xz
refactor: use std::string for thread names
Diffstat (limited to 'src/util/thread.cpp')
-rw-r--r--src/util/thread.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/util/thread.cpp b/src/util/thread.cpp
index f9f427ba20..ae98abdb3d 100644
--- a/src/util/thread.cpp
+++ b/src/util/thread.cpp
@@ -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();