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

Method waitAndPop

include/openpose/thread/threadManager.hpp:343–359  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

341
342 template<typename TDatums, typename TWorker, typename TQueue>
343 bool ThreadManager<TDatums, TWorker, TQueue>::waitAndPop(TDatums& tDatums)
344 {
345 try
346 {
347 if (mThreadManagerMode != ThreadManagerMode::Asynchronous
348 && mThreadManagerMode != ThreadManagerMode::AsynchronousOut)
349 error("Not available for this ThreadManagerMode.", __LINE__, __FUNCTION__, __FILE__);
350 if (mTQueues.empty())
351 error("ThreadManager already stopped or not started yet.", __LINE__, __FUNCTION__, __FILE__);
352 return (*mTQueues.rbegin())->waitAndPop(tDatums);
353 }
354 catch (const std::exception& e)
355 {
356 error(e.what(), __LINE__, __FUNCTION__, __FILE__);
357 return false;
358 }
359 }
360
361 template<typename TDatums, typename TWorker, typename TQueue>
362 void ThreadManager<TDatums, TWorker, TQueue>::add(const std::vector<std::tuple<unsigned long long, std::vector<TWorker>,

Callers

nothing calls this directly

Calls 3

whatMethod · 0.80
errorFunction · 0.50
emptyMethod · 0.45

Tested by

no test coverage detected