mirror of
https://github.com/micro-ROS/micro-ROS-Agent.git
synced 2026-09-07 02:08:23 +02:00
Add exit to graph manager thread
This commit is contained in:
@@ -137,10 +137,15 @@ inline void GraphManager::publish_microros_graph()
|
||||
std::unique_lock<std::mutex> lock(mtx_);
|
||||
cv_.wait(lock, [this]()
|
||||
{
|
||||
return this->graph_changed_;
|
||||
return this->graph_changed_ || exit;
|
||||
});
|
||||
}
|
||||
|
||||
if (exit)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
if (display_on_change_)
|
||||
{
|
||||
std::cout << "Updated uros Graph: graph changed" << std::endl;
|
||||
|
||||
Reference in New Issue
Block a user