waitForMessage and wait untill the call back function is done
Say we already have a subscriber for a topic which has its own callback function.
My main goal is to keep a line of code somewhere else waiting until the this subscriber has received a massage on its topic and is also done with its callback function.
the waitForMessage allows me to keep everything waiting until the subscriber has received a message, but it does not wait until the it is also done with its call back function, right?
is there a way to wait until the callback function is also done?
This question confuses me. There is no "subscriber callback" when you use
waitForMessage(..)
. That function simply blocks until it has received a single message of the type you indicate on the topic you specify.Which subscriber are you referring to here?
@gvdhoorn sorry I should have explained it better. Say we already have a subscriber for a topic which has its own callback function. My main goal is to keep a line of code somewhere else waiting until the this subscriber has received a massage on its topic and is also done with its callback function. the waitForMessage allows me to keep everything waiting until the subscriber has received a message, but it does not wait until the it is also done with its call back function, right?