Stop all of the worker threads.
| 186 | |
| 187 | //! Stop all of the worker threads. |
| 188 | void StopWorkerThreads() |
| 189 | { |
| 190 | WITH_LOCK(m_mutex, m_request_stop = true); |
| 191 | m_worker_cv.notify_all(); |
| 192 | for (std::thread& t : m_worker_threads) { |
| 193 | t.join(); |
| 194 | } |
| 195 | m_worker_threads.clear(); |
| 196 | WITH_LOCK(m_mutex, m_request_stop = false); |
| 197 | } |
| 198 | |
| 199 | ~CCheckQueue() |
| 200 | { |