MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / TraceThread

Method TraceThread

src/util/thread.cpp:15–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13#include <string>
14
15void util::TraceThread(std::string_view thread_name, std::function<void()> thread_func)
16{
17 util::ThreadRename(std::string{thread_name});
18 try {
19 LogInfo("%s thread start", thread_name);
20 thread_func();
21 LogInfo("%s thread exit", thread_name);
22 } catch (const std::exception& e) {
23 PrintExceptionContinue(&e, thread_name);
24 throw;
25 } catch (...) {
26 PrintExceptionContinue(nullptr, thread_name);
27 throw;
28 }
29}

Callers

nothing calls this directly

Calls 1

PrintExceptionContinueFunction · 0.85

Tested by

no test coverage detected