MCPcopy Create free account
hub / github.com/ElementsProject/elements / StopWorkerThreads

Method StopWorkerThreads

src/checkqueue.h:188–197  ·  view source on GitHub ↗

Stop all of the worker threads.

Source from the content-addressed store, hash-verified

186
187 //! Stop all of the worker threads.
188 void StopWorkerThreads()
189 {
190 WITH_LOCK(m_mutex, m_request_stop = true);
191 m_worker_cv.notify_all();
192 for (std::thread& t : m_worker_threads) {
193 t.join();
194 }
195 m_worker_threads.clear();
196 WITH_LOCK(m_mutex, m_request_stop = false);
197 }
198
199 ~CCheckQueue()
200 {

Callers 5

Correct_Queue_rangeFunction · 0.80
BOOST_AUTO_TEST_CASEFunction · 0.80
BOOST_AUTO_TEST_CASEFunction · 0.80

Calls 2

joinMethod · 0.45
clearMethod · 0.45

Tested by 3

Correct_Queue_rangeFunction · 0.64
BOOST_AUTO_TEST_CASEFunction · 0.64
BOOST_AUTO_TEST_CASEFunction · 0.64