waitForMessage and wait untill the call back function is done

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

azerila gravatar image

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

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 -0500 )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 -0500 )edit