| 224 | |
| 225 | template<typename TDatums, typename TWorker, typename TQueue> |
| 226 | void ThreadManager<TDatums, TWorker, TQueue>::stop() |
| 227 | { |
| 228 | try |
| 229 | { |
| 230 | opLog("", Priority::Low, __LINE__, __FUNCTION__, __FILE__); |
| 231 | for (auto& tQueue : mTQueues) |
| 232 | tQueue->stop(); |
| 233 | opLog("", Priority::Low, __LINE__, __FUNCTION__, __FILE__); |
| 234 | *spIsRunning = false; |
| 235 | for (auto& thread : mThreads) |
| 236 | thread->stopAndJoin(); |
| 237 | opLog("", Priority::Low, __LINE__, __FUNCTION__, __FILE__); |
| 238 | checkWorkerErrors(); |
| 239 | opLog("", Priority::Low, __LINE__, __FUNCTION__, __FILE__); |
| 240 | } |
| 241 | catch (const std::exception& e) |
| 242 | { |
| 243 | error(e.what(), __LINE__, __FUNCTION__, __FILE__); |
| 244 | } |
| 245 | } |
| 246 | |
| 247 | template<typename TDatums, typename TWorker, typename TQueue> |
| 248 | bool ThreadManager<TDatums, TWorker, TQueue>::tryEmplace(TDatums& tDatums) |
nothing calls this directly
no test coverage detected