| 239 | } |
| 240 | |
| 241 | void AsyncRouter::ThreadFunc() |
| 242 | { |
| 243 | while (true) |
| 244 | { |
| 245 | { |
| 246 | unique_lock ul(m_guard); |
| 247 | m_threadCondVar.wait(ul, [this]() { return m_threadExit || m_hasRequest || m_clearState; }); |
| 248 | |
| 249 | if (m_clearState && m_router) |
| 250 | { |
| 251 | m_router->ClearState(); |
| 252 | m_clearState = false; |
| 253 | } |
| 254 | |
| 255 | if (m_threadExit) |
| 256 | break; |
| 257 | |
| 258 | if (!m_hasRequest) |
| 259 | continue; |
| 260 | } |
| 261 | |
| 262 | CalculateRoute(); |
| 263 | } |
| 264 | } |
| 265 | |
| 266 | void AsyncRouter::CalculateRoute() |
| 267 | { |
nothing calls this directly
no test coverage detected