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

Method stop

include/openpose/thread/threadManager.hpp:226–245  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

224
225 template<typename TDatums, typename TWorker, typename TQueue>
226 void ThreadManager<TDatums, TWorker, TQueue>::stop()
227 {
228 try
229 {
230 opLog("", Priority::Low, __LINE__, __FUNCTION__, __FILE__);
231 for (auto& tQueue : mTQueues)
232 tQueue->stop();
233 opLog("", Priority::Low, __LINE__, __FUNCTION__, __FILE__);
234 *spIsRunning = false;
235 for (auto& thread : mThreads)
236 thread->stopAndJoin();
237 opLog("", Priority::Low, __LINE__, __FUNCTION__, __FILE__);
238 checkWorkerErrors();
239 opLog("", Priority::Low, __LINE__, __FUNCTION__, __FILE__);
240 }
241 catch (const std::exception& e)
242 {
243 error(e.what(), __LINE__, __FUNCTION__, __FILE__);
244 }
245 }
246
247 template<typename TDatums, typename TWorker, typename TQueue>
248 bool ThreadManager<TDatums, TWorker, TQueue>::tryEmplace(TDatums& tDatums)

Callers

nothing calls this directly

Calls 5

checkWorkerErrorsFunction · 0.85
stopAndJoinMethod · 0.80
whatMethod · 0.80
opLogFunction · 0.50
errorFunction · 0.50

Tested by

no test coverage detected