| 100 | } |
| 101 | |
| 102 | void Estimator::StopBackendThread() { |
| 103 | if (!m_backend_running.load()) { |
| 104 | return; |
| 105 | } |
| 106 | |
| 107 | // Signal thread to stop |
| 108 | m_backend_stop_requested.store(true); |
| 109 | |
| 110 | // Wake up the thread if it's waiting |
| 111 | { |
| 112 | std::lock_guard<std::mutex> lock(m_queue_mutex); |
| 113 | m_queue_cv.notify_all(); |
| 114 | } |
| 115 | |
| 116 | // Wait for thread to finish |
| 117 | if (m_backend_thread.joinable()) { |
| 118 | m_backend_thread.join(); |
| 119 | } |
| 120 | |
| 121 | m_backend_running.store(false); |
| 122 | LOG_INFO("Backend thread stopped"); |
| 123 | } |
| 124 | |
| 125 | void Estimator::BackendLoop() { |
| 126 | LOG_INFO("Backend loop started"); |
nothing calls this directly
no outgoing calls
no test coverage detected