Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #52249

Re: To make simpleXMLRPC support multi-thread

From dieter <dieter@handshake.de>
Subject Re: To make simpleXMLRPC support multi-thread
Date 2013-08-09 08:34 +0200
References <f85ed284-12bf-404c-b141-92bfe8d88261@googlegroups.com>
Newsgroups comp.lang.python
Message-ID <mailman.388.1376030081.1251.python-list@python.org> (permalink)

Show all headers | View raw


Zhang JiaQiang <zhangjiaqiang@gmail.com> writes:

> I try to use simpleXMLRPC and support request multithreads ,used ThreadingMixIn.
>
> Why what I get from the console still blocking ?

I am not sure - but, you fail to call the inherited "__init__" method
in your deriving class. This might things mess up.

> ...
> class ListDirRPCServer(ThreadingMixIn, SimpleXMLRPCServer):
>     def __init__(self, ip, port):
>         self.server = SimpleXMLRPCServer((ip, port), logRequests=True)
>         self.server.register_function(list_contents)

Usually, in a derived class's "__init__" method, you should
call the inherited "__init__" method.

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

To make simpleXMLRPC support multi-thread Zhang JiaQiang <zhangjiaqiang@gmail.com> - 2013-08-08 02:03 -0700
  Re: To make simpleXMLRPC support multi-thread dieter <dieter@handshake.de> - 2013-08-09 08:34 +0200

csiph-web