| 465 | |
| 466 | template<typename TDatums, typename TQueue> |
| 467 | bool QueueBase<TDatums, TQueue>::push(const TDatums& tDatums) |
| 468 | { |
| 469 | try |
| 470 | { |
| 471 | if (mPushIsStopped) |
| 472 | return false; |
| 473 | |
| 474 | mTQueue.push(tDatums); |
| 475 | mConditionVariable.notify_all(); |
| 476 | return true; |
| 477 | } |
| 478 | catch (const std::exception& e) |
| 479 | { |
| 480 | error(e.what(), __LINE__, __FUNCTION__, __FILE__); |
| 481 | return false; |
| 482 | } |
| 483 | } |
| 484 | |
| 485 | template<typename TDatums, typename TQueue> |
| 486 | bool QueueBase<TDatums, TQueue>::pop() |