| 98 | class StdThreadPool: public ThreadPool { |
| 99 | public: |
| 100 | StdThreadPool(const std::string& name, int num_threads) |
| 101 | : shutdown_(false), counter_(0) { |
| 102 | for (int i = 0; i < num_threads; ++i) { |
| 103 | job_queues_.emplace_back(new JobQueue<ThreadFunc>()); |
| 104 | } |
| 105 | for (int i = 0; i < num_threads; ++i) { |
| 106 | threads_.emplace_back(new StdThread(name, [this, i] () { Loop(i); })); |
| 107 | } |
| 108 | } |
| 109 | |
| 110 | ~StdThreadPool() override { |
| 111 | Shutdown(); |
nothing calls this directly
no outgoing calls
no test coverage detected