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

Method exec

include/openpose/thread/threadManager.hpp:181–204  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

179
180 template<typename TDatums, typename TWorker, typename TQueue>
181 void ThreadManager<TDatums, TWorker, TQueue>::exec()
182 {
183 try
184 {
185 opLog("", Priority::Low, __LINE__, __FUNCTION__, __FILE__);
186 // Set threads
187 multisetToThreads();
188 if (!mThreads.empty())
189 {
190 opLog("", Priority::Low, __LINE__, __FUNCTION__, __FILE__);
191 // Start threads
192 for (auto i = 0u; i < mThreads.size() - 1; i++)
193 mThreads.at(i)->startInThread();
194 (*mThreads.rbegin())->exec(spIsRunning);
195 // Stop threads - It will arrive here when the exec() command has finished
196 stop();
197 }
198 opLog("", Priority::Low, __LINE__, __FUNCTION__, __FILE__);
199 }
200 catch (const std::exception& e)
201 {
202 error(e.what(), __LINE__, __FUNCTION__, __FILE__);
203 }
204 }
205
206 template<typename TDatums, typename TWorker, typename TQueue>
207 void ThreadManager<TDatums, TWorker, TQueue>::start()

Callers

nothing calls this directly

Calls 6

startInThreadMethod · 0.80
whatMethod · 0.80
opLogFunction · 0.50
errorFunction · 0.50
emptyMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected