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

Method execute

libminifi/src/utils/ThreadPool.cpp:101–112  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

99
100template<typename T>
101bool ThreadPool<T>::execute(Worker<T> &&task, std::future<T> &future) {
102 {
103 std::unique_lock<std::mutex> lock(worker_queue_mutex_);
104 task_status_[task.getIdentifier()] = true;
105 }
106 future = std::move(task.getPromise()->get_future());
107 worker_queue_.enqueue(std::move(task));
108
109 task_count_++;
110
111 return true;
112}
113
114template<typename T>
115void ThreadPool<T>::manageWorkers() {

Callers 8

BackTraceTests.cppFile · 0.45
SocketTests.cppFile · 0.45
scheduleMethod · 0.45
startMethod · 0.45

Calls 3

getPromiseMethod · 0.80
getIdentifierMethod · 0.45
enqueueMethod · 0.45

Tested by

no test coverage detected