| 18 | } |
| 19 | |
| 20 | void RunWorker(void* data) { |
| 21 | ThreadPool* const thread_pool = reinterpret_cast<ThreadPool*>(data); |
| 22 | auto task = thread_pool->getNextTask(); |
| 23 | while (task) { |
| 24 | task(); |
| 25 | task = thread_pool->getNextTask(); |
| 26 | } |
| 27 | thread_pool->stopOnFinalBarrier(); |
| 28 | } |
| 29 | |
| 30 | void ThreadPool::startWorkers() { |
| 31 | started_ = true; |
nothing calls this directly
no test coverage detected