This might be a very basic question but I couldn`t find an exact answer anywhere . Does the ros::shutdown() command also stop all the Async spinner threads automatically?
I have a lot of blocking functions in my main loop so I created a custom SIGINT signal to close the node as such:
void nodeShutdown(int sig)
{
ROS_INFO("Closing socket connection ...");
close(client);
close(s);
ros::shutdown();
}
This doesnt give me a chance to call stop on the spinner. It works but I`m not sure if this is safe. If there is a better way can someone point me towards it?
Originally posted by ashu on ROS Answers with karma: 17 on 2020-07-29
Post score: 0