| 172 | |
| 173 | template<typename TDatums, typename TQueue> |
| 174 | bool QueueBase<TDatums, TQueue>::forcePush(const TDatums& tDatums) |
| 175 | { |
| 176 | try |
| 177 | { |
| 178 | const std::lock_guard<std::mutex> lock{mMutex}; |
| 179 | if (mTQueue.size() >= getMaxSize()) |
| 180 | mTQueue.pop(); |
| 181 | return push(tDatums); |
| 182 | } |
| 183 | catch (const std::exception& e) |
| 184 | { |
| 185 | error(e.what(), __LINE__, __FUNCTION__, __FILE__); |
| 186 | return false; |
| 187 | } |
| 188 | } |
| 189 | |
| 190 | template<typename TDatums, typename TQueue> |
| 191 | bool QueueBase<TDatums, TQueue>::tryPush(const TDatums& tDatums) |