1
0
mirror of https://gitlab.com/obbart/universal_robots_ros_driver.git synced 2026-04-10 10:00:48 +02:00

Removed potential deadlock

This commit is contained in:
Thomas Timm Andersen
2015-09-08 12:40:35 +02:00
2 changed files with 7 additions and 0 deletions

View File

@@ -45,6 +45,12 @@ RobotStateRT::RobotStateRT(std::condition_variable& msg_cond) {
pMsg_cond_ = &msg_cond;
}
RobotStateRT::~RobotStateRT() {
/* Make sure nobody is waiting after this thread is destroyed */
new_data_available_ = true;
pMsg_cond_->notify_all();
}
bool RobotStateRT::getNewDataAvailable() {
return new_data_available_;
}