Keep graph manager alive until destruction

This commit is contained in:
Antonio cuadros
2021-07-28 10:01:55 +02:00
parent 1b606c7e92
commit a86d883128
2 changed files with 10 additions and 20 deletions
@@ -80,17 +80,15 @@ public:
/**
* @brief Default destructor.
*/
~GraphManager() = default;
void stop()
{
if (microros_graph_publisher_.joinable())
{
exit = true;
cv_.notify_one();
microros_graph_publisher_.join();
}
}
~GraphManager()
{
if (microros_graph_publisher_.joinable())
{
exit = true;
cv_.notify_one();
microros_graph_publisher_.join();
}
}
/**
* @brief Implementation of the notification logic that updates the micro-ROS graph.