Is this SimpleActionClient instantiation thread-safe for the callbacks?
First, I am constructing an instance of the template class SimpleActionClient
as follows:
actionlib::SimpleActionClient<MyAction> client(nh_, "topic", true /*spin_thread*/);
Later I am assigning callbacks (done_cb, active_cb, feedback_cb
) with sendGoal
.
Will those callbacks be thread-safe since they use the same global spinner or would they not be thread-safe in this case since the spinning is done in a separate thread?