Thread Callback Server
Hi,
This time i try, in a single node, to have a server, a subscriber and a publisher. I receive a request from a client and publish it to other nodes and need the answer to send it back to the client. So I have to "pause" my server callback and wait for the answer from the subscriber callback.
I assume that I need to multithread my Node because the server may not be put in a wait mode without a while (flag!=true) and I know how to do the multithreading with posix but here it is more a problem of queuing and spinner.
My code is simple, when i receive the answer it copy the request into a msg and wait with a while. I have a callback for my subscriber. I've tried to introduce boost::thread and callbackqueue but coudn't find a way to make it work. Do you have tips in order to do that ?
Tanks