1 #ifndef OPENPOSE_THREAD_THREAD_QUEUE_IN_HPP
2 #define OPENPOSE_THREAD_THREAD_QUEUE_IN_HPP
11 template<
typename TDatums,
typename TWorker = std::shared_ptr<Worker<TDatums>>,
typename TQueue = Queue<TDatums>>
15 SubThreadQueueIn(
const std::vector<TWorker>& tWorkers,
const std::shared_ptr<TQueue>& tQueueIn);
20 std::shared_ptr<TQueue> spTQueueIn;
33 template<
typename TDatums,
typename TWorker,
typename TQueue>
41 template<
typename TDatums,
typename TWorker,
typename TQueue>
48 bool queueIsRunning =
spTQueueIn->tryPop(tDatums);
53 const auto workersAreRunning = this->workTWorkers(tDatums, queueIsRunning);
55 if (!workersAreRunning)
57 return workersAreRunning;
59 catch (
const std::exception& e)
61 error(e.what(), __LINE__, __FUNCTION__, __FILE__);
70 #endif // OPENPOSE_THREAD_THREAD_QUEUE_IN_HPP
Definition: subThread.hpp:10
SubThreadQueueIn(const std::vector< TWorker > &tWorkers, const std::shared_ptr< TQueue > &tQueueIn)
Definition: subThreadQueueIn.hpp:34
OP_API void error(const std::string &message, const int line=-1, const std::string &function="", const std::string &file="")
spTQueueIn
Definition: subThreadQueueIn.hpp:36
COMPILE_TEMPLATE_DATUM(WPoseTriangulation)
Definition: subThreadQueueIn.hpp:12