MankaranSingh
Are you using python or C++ client?
Philippe's answer is valid for Python client but C++ async works different.
If you are using C++ client and just do that:
req.getParameter("root/MyModule1/input4");
You are getting a blocking call similar as if you do
auto reply = req.getParameter("root/MyModule1/input4").get();
This happens because async object is deleted and on destructor is calling .get() anyway.
If you want to have true async behaviour you need to store returned object yourself and resolve it
yourself. In a real program replies can be stored in a queue and resolved as following:
std::queue<GetParameterReply> reply_queue;
reply_queue.push(req.getParameter("root/MyModule1/input4"));
...
...
after some time start to clean the front of the queue
if (reply_queue.front().wait_for(0s) == future_status::ready) {
reply_queue.pop(); // blocking happens here but async is already resolved, so it is instant
}
I will check if there are unnecessary latency on the server side, if I find any I will improve it.
In general setParameter and getParameter are designed to guarantee delivery and setting/getting parameter in the tree. For true real-time communication for have UDP receiver.
Hope this helps