| 318 | |
| 319 | template<typename TDatums, typename TQueue> |
| 320 | void QueueBase<TDatums, TQueue>::stopPusher() |
| 321 | { |
| 322 | try |
| 323 | { |
| 324 | opLog("", Priority::Low, __LINE__, __FUNCTION__, __FILE__); |
| 325 | const std::lock_guard<std::mutex> lock{mMutex}; |
| 326 | mPushers--; |
| 327 | if (mPushers == 0) |
| 328 | { |
| 329 | mPushIsStopped = {true}; |
| 330 | if (mTQueue.empty()) |
| 331 | mPopIsStopped = {true}; |
| 332 | mConditionVariable.notify_all(); |
| 333 | } |
| 334 | } |
| 335 | catch (const std::exception& e) |
| 336 | { |
| 337 | error(e.what(), __LINE__, __FUNCTION__, __FILE__); |
| 338 | } |
| 339 | } |
| 340 | |
| 341 | template<typename TDatums, typename TQueue> |
| 342 | void QueueBase<TDatums, TQueue>::addPopper() |