MCPcopy Create free account
hub / github.com/ElementsProject/elements / TraceThread

Method TraceThread

src/util/thread.cpp:13–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

PrintExceptionContinueFunction · 0.85

Tested by

no test coverage detected