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

Method ThreadFunc

libs/routing/async_router.cpp:241–264  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

239}
240
241void 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
266void AsyncRouter::CalculateRoute()
267{

Callers

nothing calls this directly

Calls 3

waitMethod · 0.80
CalculateRouteFunction · 0.50
ClearStateMethod · 0.45

Tested by

no test coverage detected