| 178 | } |
| 179 | |
| 180 | TaskScheduler::ThreadPool::~ThreadPool() |
| 181 | { |
| 182 | /* leave all taskschedulers */ |
| 183 | mutex.lock(); |
| 184 | numThreadsRunning = 0; |
| 185 | mutex.unlock(); |
| 186 | condition.notify_all(); |
| 187 | |
| 188 | /* wait for threads to terminate */ |
| 189 | for (size_t i=0; i<threads.size(); i++) |
| 190 | embree::join(threads[i]); |
| 191 | } |
| 192 | |
| 193 | dll_export void TaskScheduler::ThreadPool::add(const Ref<TaskScheduler>& scheduler) |
| 194 | { |
nothing calls this directly
no test coverage detected