MCPcopy Create free account
hub / github.com/apache/nifi-minifi-cpp / getTraces

Method getTraces

libminifi/include/utils/ThreadPool.h:244–258  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

242 }
243
244 std::vector<BackTrace> getTraces() {
245 std::vector<BackTrace> traces;
246 std::lock_guard<std::recursive_mutex> lock(manager_mutex_);
247 std::unique_lock<std::mutex> wlock(worker_queue_mutex_);
248 // while we may be checking if running, we don't want to
249 // use the threads outside of the manager mutex's lock -- therefore we will
250 // obtain a lock so we can keep the threads in memory
251 if (running_) {
252 for (const auto &worker : thread_queue_) {
253 if (worker->is_running_)
254 traces.emplace_back(TraceResolver::getResolver().getBackTrace(worker->name_, worker->thread_.native_handle()));
255 }
256 }
257 return traces;
258 }
259
260 /**
261 * Starts the Thread Pool

Callers

nothing calls this directly

Calls 1

getBackTraceMethod · 0.45

Tested by

no test coverage detected