waitForMessage and wait untill the call back function is done

asked 2020-04-25 09:11:15 -0600

azerila gravatar image

updated 2020-04-25 10:33:24 -0600

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?

edit retag flag offensive close merge delete

Comments

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 gravatar image gvdhoorn  ( 2020-04-25 09:37:50 -0600 )edit

@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?

azerila gravatar image azerila  ( 2020-04-25 10:30:56 -0600 )edit