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


Groups > comp.lang.python > #52249

Re: To make simpleXMLRPC support multi-thread

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!eweka.nl!lightspeed.eweka.nl!194.109.133.86.MISMATCH!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.001
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'method.': 0.07; 'subject:support': 0.07; 'derived': 0.09; 'inherited': 0.09; 'mess': 0.09; 'method,': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'def': 0.12; 'blocking': 0.16; 'port),': 0.16; 'received:80.91.229.3': 0.16; 'received:dip0.t-ipconnect.de': 0.16; 'received:plane.gmane.org': 0.16; 'received:t-ipconnect.de': 0.16; 'subject:make': 0.16; 'header:User-Agent:1': 0.23; 'skip:l 30': 0.24; 'class.': 0.26; 'header:X-Complaints-To:1': 0.27; 'writes:': 0.31; 'class': 0.32; 'up.': 0.33; 'skip:_ 10': 0.34; 'method': 0.36; 'should': 0.36; 'to:addr:python-list': 0.38; 'sure': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'received:217': 0.63; 'charset:iso-2022-jp': 0.65; "class's": 0.84; 'zhang': 0.84
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From dieter <dieter@handshake.de>
Subject Re: To make simpleXMLRPC support multi-thread
Date Fri, 09 Aug 2013 08:34:27 +0200
References <f85ed284-12bf-404c-b141-92bfe8d88261@googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=iso-2022-jp
X-Gmane-NNTP-Posting-Host pd9e08bbf.dip0.t-ipconnect.de
User-Agent Gnus/5.1008 (Gnus v5.10.8) XEmacs/21.4.22 (linux)
Cancel-Lock sha1:jNFlKxEA7WCP9X+TPaRwaMSVANc=
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.388.1376030081.1251.python-list@python.org> (permalink)
Lines 18
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1376030081 news.xs4all.nl 15888 [2001:888:2000:d::a6]:48336
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:52249

Show key headers only | 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