| 222 | } |
| 223 | |
| 224 | void ThreadPoolBase::AddTaskNoLock(TaskFunc &&f) { |
| 225 | if (shutdown_pending_) |
| 226 | throw std::logic_error("The thread pool is stopped and no longer accepts new tasks."); |
| 227 | tasks_.push(std::move(f)); |
| 228 | } |
| 229 | |
| 230 | void ThreadPoolBase::AddTask(TaskFunc &&f) { |
| 231 | { |