mirror of
https://gitlab.com/obbart/universal_robots_ros_driver.git
synced 2026-04-10 18:10:47 +02:00
Removed potential deadlock
This commit is contained in:
@@ -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_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user