| 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 |
nothing calls this directly
no test coverage detected