| 591 | class ThreadPool : public TaskQueue { |
| 592 | public: |
| 593 | explicit ThreadPool(size_t n) : shutdown_(false) { |
| 594 | while (n) { |
| 595 | threads_.emplace_back(worker(*this)); |
| 596 | n--; |
| 597 | } |
| 598 | } |
| 599 | |
| 600 | ThreadPool(const ThreadPool &) = delete; |
| 601 | ~ThreadPool() override = default; |