diff options
author | stickies-v <stickies-v@protonmail.com> | 2022-08-31 16:30:35 +0100 |
---|---|---|
committer | stickies-v <stickies-v@protonmail.com> | 2022-09-13 19:07:39 +0100 |
commit | 97f5b20c12ca6ccf89d7720a5d41eaf4cda1b695 (patch) | |
tree | fee87877bc54e805480a708002716467e9a82652 /src/util/thread.cpp | |
parent | 29d540b7ada890dd588c4825d40c27c5e6f20061 (diff) | |
download | bitcoin-97f5b20c12ca6ccf89d7720a5d41eaf4cda1b695.tar.xz |
refactor: use std::string for thread names
Diffstat (limited to 'src/util/thread.cpp')
-rw-r--r-- | src/util/thread.cpp | 6 |
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(); |