Keep graph manager alive until destruction

This commit is contained in:
Antonio cuadros
2021-07-28 10:03:08 +02:00
parent b0d4f46f8a
commit a0ce74a157
2 changed files with 9 additions and 18 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.