Hi!
Suppose I have a subscriber with a callback C. C manipulates a number of global variables and then calls a second method M, that builds a message from those global variables and publishes the message.
I am now wondering: Is is possible that C and M interfere, i.e., that M uses global variables that have been modified by a different call to C? Or, stated differently, is it possible to call C before the previous call to C has returned?
I was not able to figure out if ros::getGlobalCallbackQueue()->callAvailable
blocks till completion. If interference in this situation can happen, how does one usually deal with it?
Thank you!
Originally posted by Jay4Ros on ROS Answers with karma: 35 on 2015-12-08
Post score: 1