| 538 | class ThreadPool : public TaskQueue { |
| 539 | public: |
| 540 | explicit ThreadPool(size_t n) : shutdown_(false) { |
| 541 | while (n) { |
| 542 | threads_.emplace_back(worker(*this)); |
| 543 | n--; |
| 544 | } |
| 545 | } |
| 546 | |
| 547 | ThreadPool(const ThreadPool&) = delete; |
| 548 | ~ThreadPool() override = default; |