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

Method tryPush

include/openpose/thread/queueBase.hpp:191–205  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

189
190 template<typename TDatums, typename TQueue>
191 bool QueueBase<TDatums, TQueue>::tryPush(const TDatums& tDatums)
192 {
193 try
194 {
195 const std::lock_guard<std::mutex> lock{mMutex};
196 if (mTQueue.size() >= getMaxSize())
197 return false;
198 return push(tDatums);
199 }
200 catch (const std::exception& e)
201 {
202 error(e.what(), __LINE__, __FUNCTION__, __FILE__);
203 return false;
204 }
205 }
206
207 template<typename TDatums, typename TQueue>
208 bool QueueBase<TDatums, TQueue>::waitAndPush(const TDatums& tDatums)

Callers

nothing calls this directly

Calls 3

whatMethod · 0.80
errorFunction · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected