MCPcopy Create free account
hub / github.com/CMU-Perceptual-Computing-Lab/openpose / forcePush

Method forcePush

include/openpose/thread/queueBase.hpp:174–188  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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)

Callers

nothing calls this directly

Calls 4

whatMethod · 0.80
errorFunction · 0.50
sizeMethod · 0.45
popMethod · 0.45

Tested by

no test coverage detected