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_lastObserverUpdate = steady_clock::now();
|
||||
|
||||
std::vector<MwmSet::MwmId> mwms;
|
||||
while (WaitForRequest(mwms))
|
||||
while (WaitForRequest())
|
||||
{
|
||||
// TODO clean out expired messages
|
||||
|
||||
@@ -698,14 +697,14 @@ void TrafficManager::ThreadRoutine()
|
||||
m_trafficETags[mwm] = tag;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
mwms.clear();
|
||||
#endif
|
||||
}
|
||||
// Calling Unsubscribe() form the worker thread on exit makes thread synchronization easier
|
||||
Unsubscribe();
|
||||
}
|
||||
|
||||
bool TrafficManager::WaitForRequest(std::vector<MwmSet::MwmId> & mwms)
|
||||
bool TrafficManager::WaitForRequest()
|
||||
{
|
||||
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).
|
||||
*/
|
||||
// TODO mwms argument is no longer needed
|
||||
bool WaitForRequest(std::vector<MwmSet::MwmId> & mwms);
|
||||
bool WaitForRequest();
|
||||
|
||||
/**
|
||||
* @brief Processes new traffic data.
|
||||
|
||||
Reference in New Issue
Block a user