You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to spserver
Hello,
Is it possible to delay response to client in spserver, so that you
wouldn't have to give an answer to client right away in the message
handler?
I'm asking because I have to do asyncronous IO calls to databases and
disk. I don't want to wait in a blocking state in my handler function
for the slow operations to finish.
So would it be possible to put client in a waiting state in the
handler,
find the client after the asynchronous calls are done (using the
client's id) and *then* send the response?
If not, do you think it would be hard to tweak the framework to allow
that?
-Marko
iunknown
unread,
Apr 7, 2011, 1:58:23 AM4/7/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to spserver
Use the dispatcher class.
1.Add a queue. Push (sid, request) to queue and return empty response
in handler.
2.Add a threadpool. Pop (sid, request) from queue to process, generate
response, and send back to client.