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


Groups > comp.lang.python > #22253

Re: Slow termination of process

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.017
X-Spam-Evidence '*H*': 0.97; '*S*': 0.00; 'skip:\xa0 30': 0.05; 'facility': 0.07; 'subject:process': 0.09; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'fruit': 0.16; 'problem!': 0.16; 'sorts': 0.16; '\xa0def': 0.16; 'wrote:': 0.21; 'received:209.85.213.46': 0.22; 'received:mail- yw0-f46.google.com': 0.22; 'header:In-Reply-To:1': 0.22; 'skip:m 30': 0.24; 'wed,': 0.24; 'defined': 0.27; 'message- id:@mail.gmail.com': 0.27; "who's": 0.27; 'class': 0.29; 'went': 0.30; 'received:209.85': 0.32; 'chris': 0.32; 'received:google.com': 0.32; 'thanks': 0.34; 'received:209': 0.35; 'there': 0.35; 'skip:_ 10': 0.35; 'things': 0.36; 'wonder': 0.36; 'so,': 0.37; 'rather': 0.38; 'someone': 0.38; 'to:addr:python- list': 0.39; 'to:addr:python.org': 0.40; 'mar': 0.61; 'better': 0.63; 'more': 0.63; '2012': 0.69; 'solved': 0.84
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=yheUejQrMXrH10v0OghHRwAItN+65TAoa7dYC96jNKA=; b=ikc9Y4C6GgAHdjowa0zxXk6jKJQCmgSrUl6Nntj2MxXTtuohp/WZ9ScsG3Y/J2idMY 3HHvt/8E90+jdNWWiUjZWB7lDq2FlwlMhxIzV51T5xd5W9057WJ6ek+ZaUX6qeS4+ZnI C0Kl0B8xvutZj2Clh8/FlB30seIz5k2i0b5wXr4FZoR9803WQdtTw2btUlIsmX7zB8CH epevYX/Ow63omKGguUUgmMNn0usL4EjiIvTjk2LMsmdJ818E80LoIXOlyle9gdxfOYxi XNdiD7Hhzq4wSiG0X60bcfNY7bbNiHkxm2bNfweJtT7InPfOVhBdneAfQaWH/7JaKWZg PXRg==
MIME-Version 1.0
In-Reply-To <634721E3-547A-49C4-96B5-503A87C7A6DD@catalogix.se>
References <F2060B24-D02C-4FDE-A83E-8447AD8E563A@catalogix.se> <CAPTjJmrnEgG5OvOWpFcZwrUOK39qrpvd1J5_9dMMFK+88QU1-A@mail.gmail.com> <634721E3-547A-49C4-96B5-503A87C7A6DD@catalogix.se>
Date Wed, 28 Mar 2012 07:57:17 +1100
Subject Re: Slow termination of process
From Chris Angelico <rosuav@gmail.com>
To python-list@python.org
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding quoted-printable
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
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.1048.1332881839.3037.python-list@python.org> (permalink)
Lines 21
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1332881839 news.xs4all.nl 6916 [2001:888:2000:d::a6]:44515
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:22253

Show key headers only | View raw


On Wed, Mar 28, 2012 at 1:52 AM, Roland Hedberg <roland@catalogix.se> wrote:
> So, I went for the low-hanging fruit and defined my own TCPServer class
>
> class MyTCPServer(SocketServer.TCPServer):
>    def __init__(self, server_address, RequestHandlerClass):
>        self.allow_reuse_address = True
>        SocketServer.TCPServer.__init__(self, server_address,
>                                        RequestHandlerClass)
>
> and this solved my problem!
>
> So, thanks again Chris!

Awesome! I wonder - and someone who's used the facility may know
better than I - is there a reason not to make these sorts of things
into keyword-only arguments? Or, more generally, is there a reason for
them to be class variables rather than instance?

Chris Angelico

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


Thread

Re: Slow termination of process Chris Angelico <rosuav@gmail.com> - 2012-03-28 07:57 +1100

csiph-web