MCPcopy Create free account
hub / github.com/comaps/comaps / Stop

Method Stop

libs/base/thread_pool.cpp:77–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

75 threads::IRoutine * PopFront() { return m_tasks.Front(true); }
76
77 void Stop()
78 {
79 m_tasks.Cancel();
80
81 for (auto & thread : m_threads)
82 thread->Cancel();
83 m_threads.clear();
84
85 m_tasks.ProcessList([this](std::list<threads::IRoutine *> const & tasks)
86 {
87 for (auto * t : tasks)
88 {
89 t->Cancel();
90 m_finishFn(t);
91 }
92 });
93 m_tasks.Clear();
94 }
95
96 bool IsStopped() const { return m_threads.empty(); }
97

Callers

nothing calls this directly

Calls 4

ProcessListMethod · 0.80
CancelMethod · 0.45
clearMethod · 0.45
ClearMethod · 0.45

Tested by

no test coverage detected