Add exit to graph manager thread

This commit is contained in:
Antonio cuadros
2021-07-16 13:54:46 +02:00
parent 37566d1c74
commit 39d8ed0ba2
2 changed files with 17 additions and 2 deletions
@@ -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;