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

Method run

libminifi/include/utils/ThreadPool.h:100–108  ·  view source on GitHub ↗

* Runs the task and takes the output from the functor * setting the result into the promise * @return whether or not to continue running * false == finished || error * true == run again */

Source from the content-addressed store, hash-verified

98 * true == run again
99 */
100 virtual bool run() {
101 T result = task();
102 if (run_determinant_ == nullptr || (run_determinant_->isFinished(result) || run_determinant_->isCancelled(result))) {
103 promise->set_value(result);
104 return false;
105 }
106 next_exec_time_ = std::max(next_exec_time_ + run_determinant_->wait_time(), std::chrono::steady_clock::now());
107 return true;
108 }
109
110 virtual void setIdentifier(const TaskId& identifier) {
111 identifier_ = identifier;

Callers

nothing calls this directly

Calls 3

isFinishedMethod · 0.45
isCancelledMethod · 0.45
wait_timeMethod · 0.45

Tested by

no test coverage detected