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

Method tryPush

include/openpose/thread/threadManager.hpp:286–302  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

284
285 template<typename TDatums, typename TWorker, typename TQueue>
286 bool ThreadManager<TDatums, TWorker, TQueue>::tryPush(const TDatums& tDatums)
287 {
288 try
289 {
290 if (mThreadManagerMode != ThreadManagerMode::Asynchronous
291 && mThreadManagerMode != ThreadManagerMode::AsynchronousIn)
292 error("Not available for this ThreadManagerMode.", __LINE__, __FUNCTION__, __FILE__);
293 if (mTQueues.empty())
294 error("ThreadManager already stopped or not started yet.", __LINE__, __FUNCTION__, __FILE__);
295 return mTQueues[0]->tryPush(tDatums);
296 }
297 catch (const std::exception& e)
298 {
299 error(e.what(), __LINE__, __FUNCTION__, __FILE__);
300 return false;
301 }
302 }
303
304 template<typename TDatums, typename TWorker, typename TQueue>
305 bool ThreadManager<TDatums, TWorker, TQueue>::waitAndPush(const TDatums& tDatums)

Callers

nothing calls this directly

Calls 3

whatMethod · 0.80
errorFunction · 0.50
emptyMethod · 0.45

Tested by

no test coverage detected