ThreadPool
ThreadPool copied to clipboard
About the Constructor
why don't you init num_workers_ in the following code:
ThreadPool::ThreadPool(const size_t& num_workers) : jobs_left_(0), bailout_(false), finished_(false) { std::unique_lock<std::mutex> worker_lock(worker_mutex_); for (auto i = 0; i < num_workers; ++i) { workers_.emplace_back(std::thread([this] { return this->Run(); })); } }