mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-19 13:03:36 +00:00
[traffic] Remove mwms from ThreadRoutine()
Signed-off-by: mvglasow <michael -at- vonglasow.com>
This commit is contained in:
@@ -629,8 +629,7 @@ void TrafficManager::ThreadRoutine()
|
|||||||
m_lastDrapeUpdate = steady_clock::now();
|
m_lastDrapeUpdate = steady_clock::now();
|
||||||
m_lastObserverUpdate = steady_clock::now();
|
m_lastObserverUpdate = steady_clock::now();
|
||||||
|
|
||||||
std::vector<MwmSet::MwmId> mwms;
|
while (WaitForRequest())
|
||||||
while (WaitForRequest(mwms))
|
|
||||||
{
|
{
|
||||||
// TODO clean out expired messages
|
// TODO clean out expired messages
|
||||||
|
|
||||||
@@ -698,14 +697,14 @@ void TrafficManager::ThreadRoutine()
|
|||||||
m_trafficETags[mwm] = tag;
|
m_trafficETags[mwm] = tag;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
mwms.clear();
|
mwms.clear();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
// Calling Unsubscribe() form the worker thread on exit makes thread synchronization easier
|
// Calling Unsubscribe() form the worker thread on exit makes thread synchronization easier
|
||||||
Unsubscribe();
|
Unsubscribe();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TrafficManager::WaitForRequest(std::vector<MwmSet::MwmId> & mwms)
|
bool TrafficManager::WaitForRequest()
|
||||||
{
|
{
|
||||||
std::unique_lock<std::mutex> lock(m_mutex);
|
std::unique_lock<std::mutex> lock(m_mutex);
|
||||||
|
|
||||||
|
|||||||
@@ -289,7 +289,7 @@ private:
|
|||||||
* @return `true` during normal operation, `false` during teardown (signaling the event loop to exit).
|
* @return `true` during normal operation, `false` during teardown (signaling the event loop to exit).
|
||||||
*/
|
*/
|
||||||
// TODO mwms argument is no longer needed
|
// TODO mwms argument is no longer needed
|
||||||
bool WaitForRequest(std::vector<MwmSet::MwmId> & mwms);
|
bool WaitForRequest();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Processes new traffic data.
|
* @brief Processes new traffic data.
|
||||||
|
|||||||
Reference in New Issue
Block a user