* 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 */
| 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; |
nothing calls this directly
no test coverage detected