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

Method waitAndPop

include/openpose/thread/queueBase.hpp:254–267  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

252
253 template<typename TDatums, typename TQueue>
254 bool QueueBase<TDatums, TQueue>::waitAndPop(TDatums& tDatums)
255 {
256 try
257 {
258 std::unique_lock<std::mutex> lock{mMutex};
259 mConditionVariable.wait(lock, [this]{return !mTQueue.empty() || mPopIsStopped; });
260 return pop(tDatums);
261 }
262 catch (const std::exception& e)
263 {
264 error(e.what(), __LINE__, __FUNCTION__, __FILE__);
265 return false;
266 }
267 }
268
269 template<typename TDatums, typename TQueue>
270 bool QueueBase<TDatums, TQueue>::waitAndPop()

Callers

nothing calls this directly

Calls 4

waitMethod · 0.80
whatMethod · 0.80
errorFunction · 0.50
emptyMethod · 0.45

Tested by

no test coverage detected