| 29 | thread_pool_(new ThreadPool(FLAGS_procedure_executor_thread_num)) {} |
| 30 | |
| 31 | bool ProcedureExecutor::Start() { |
| 32 | std::unique_lock<std::mutex> lock(mutex_); |
| 33 | if (running_) { |
| 34 | return false; |
| 35 | } |
| 36 | running_ = true; |
| 37 | schedule_thread_ = std::move(std::thread(&ProcedureExecutor::ScheduleProcedures, this)); |
| 38 | return true; |
| 39 | } |
| 40 | |
| 41 | void ProcedureExecutor::Stop() { |
| 42 | mutex_.lock(); |
no outgoing calls
no test coverage detected