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

Method tryPop

include/openpose/thread/threadManager.hpp:324–340  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

322
323 template<typename TDatums, typename TWorker, typename TQueue>
324 bool ThreadManager<TDatums, TWorker, TQueue>::tryPop(TDatums& tDatums)
325 {
326 try
327 {
328 if (mThreadManagerMode != ThreadManagerMode::Asynchronous
329 && mThreadManagerMode != ThreadManagerMode::AsynchronousOut)
330 error("Not available for this ThreadManagerMode.", __LINE__, __FUNCTION__, __FILE__);
331 if (mTQueues.empty())
332 error("ThreadManager already stopped or not started yet.", __LINE__, __FUNCTION__, __FILE__);
333 return (*mTQueues.rbegin())->tryPop(tDatums);
334 }
335 catch (const std::exception& e)
336 {
337 error(e.what(), __LINE__, __FUNCTION__, __FILE__);
338 return false;
339 }
340 }
341
342 template<typename TDatums, typename TWorker, typename TQueue>
343 bool ThreadManager<TDatums, TWorker, TQueue>::waitAndPop(TDatums& tDatums)

Callers

nothing calls this directly

Calls 3

whatMethod · 0.80
errorFunction · 0.50
emptyMethod · 0.45

Tested by

no test coverage detected