| 299 | |
| 300 | template<typename TDatums, typename TQueue> |
| 301 | void QueueBase<TDatums, TQueue>::stop() |
| 302 | { |
| 303 | try |
| 304 | { |
| 305 | opLog("", Priority::Low, __LINE__, __FUNCTION__, __FILE__); |
| 306 | const std::lock_guard<std::mutex> lock{mMutex}; |
| 307 | mPopIsStopped = {true}; |
| 308 | mPushIsStopped = {true}; |
| 309 | while (!mTQueue.empty()) |
| 310 | mTQueue.pop(); |
| 311 | mConditionVariable.notify_all(); |
| 312 | } |
| 313 | catch (const std::exception& e) |
| 314 | { |
| 315 | error(e.what(), __LINE__, __FUNCTION__, __FILE__); |
| 316 | } |
| 317 | } |
| 318 | |
| 319 | template<typename TDatums, typename TQueue> |
| 320 | void QueueBase<TDatums, TQueue>::stopPusher() |