py-xmlrpc postpone question

elbertlev at hotmail.com elbertlev at hotmail.com
Mon Jan 31 15:03:49 EST 2005


Hi!
I'm trying to use py-xmlrpc. All works fine (and very fast) in
one-threaded case, but I really have to serve many clients.

As advertised, py-xmlrpc supports non-blocking calls (via select).

When request is received the handler is called with proper parameters.
As I understood from reading the source, if rpc call can't be executed
immediately (or takes long time) respond can be postponed by raising
postpone exception and when respond is ready, calling queueResponse() .


I wanted to have a pool of worker threads listening on a queue. In the
"lengthy command handlers", post data on the queue and raise postpone.
Threads from the pool respond by calling queueResponse() when rpc is
done.

Server trace tells me that postpone was received, but client reacts as
if socket was closed (got EOS while reading). I tryed to supress
default error handling on the client side by returning from OnErr()
xmlrpc.ONERR_KEEP_WORK, but this kills the interpreter!
What am I doing wrong?




More information about the Python-list mailing list