[Cppcms-users] How to fullfill ajax-call from different thread?
Brought to you by:
artyom-beilis
From: eric m. <mid...@gm...> - 2016-02-14 07:39:01
|
Hi, Taking the json_rpc_chat example as a starting point, is it possible to respond to get() from another thread? Let me elaborate a bit on that. In the chat example the get activates a callback that is called by a post from the browser via the broadcast method. Is it possible to let this callback be called by a different server-thread that is performing a task and comes back with the result to be returned to the original get activated by the browser? To put it differently, is it possible to interact with the json_rpc_server and fullfill callbacks from outside? Reason for asking is that I'm using ajax-calls to perform tasks on the server but I do not want the browser to hang up on it while waiting for the result. Kind regards, Eric |