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


Groups > comp.lang.python > #60280

Re: select.select()

Path csiph.com!usenet.pasdenom.info!goblin1!goblin.stu.neva.ru!uio.no!news.tele.dk!news.tele.dk!small.news.tele.dk!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.014
X-Spam-Evidence '*H*': 0.97; '*S*': 0.00; 'subject:skip:s 10': 0.07; 'assuming': 0.09; 'calls.': 0.09; 'subject:()': 0.09; 'yeah,': 0.09; '23,': 0.16; 'blocking': 0.16; 'concurrent': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'roy': 0.16; 'sake,': 0.16; 'simplifies': 0.16; 'thread,': 0.16; 'sat,': 0.16; 'wrote:': 0.18; '(not': 0.18; 'command': 0.22; 'select': 0.22; 'issue.': 0.22; 'certainly': 0.24; 'server.': 0.24; 'hall': 0.26; 'header:In-Reply-To:1': 0.27; 'scale': 0.29; 'message- id:@mail.gmail.com': 0.30; "i'm": 0.30; '(which': 0.31; 'code': 0.31; 'actual': 0.34; 'connection': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'nov': 0.38; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'does': 0.39; 'sure': 0.39; 'to:addr:python.org': 0.39; 'games,': 0.60; 'simply': 0.61; 'real': 0.63; 'more': 0.64; 'effectively': 0.66; 'reads': 0.68; 'smith': 0.68; 'facilities': 0.69; 'user,': 0.69; 'bulk': 0.74; '2013': 0.98
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; bh=YlVbq2DdtUyWQEbSX/9AZuC1Notdh1fCP9Yv2bx7D80=; b=c4npMHhtPl1xML1cOnQnzqYJCyNYIwKQhilpMx1Qu5uGbq58AYIHTPVmMpXxaZULPD OHUzbNjrb9es3ul5FzsIcHL+9BY4cegRZ5Eiic/WNUngWMCLXvVmB28S4U1HC+q34eNl 2Dr5MLOrW/f+4t3drJPgEmytyjRi0B52Av8+bEC+h8Y0nsztwBEz9s4fMKrSh0sG1FyW hJgAErMBEiwNL/GowV6gtFvt9H+hsxlxO7GpUFY5s+L6INpemMAjIxE+XasDbGQ/dsoI mOw2Oo2HIvQsE6vFa+DSdEZVO/H+zQCUs3L76bYBpY2MXwjZ1tOdVIBQSALgDnMVafat 8k3Q==
MIME-Version 1.0
X-Received by 10.66.122.40 with SMTP id lp8mr16047889pab.82.1385191846138; Fri, 22 Nov 2013 23:30:46 -0800 (PST)
In-Reply-To <roy-4170EF.21151022112013@news.panix.com>
References <b8d42424-e0ab-4595-9c87-25e5c1b53349@googlegroups.com> <roy-4170EF.21151022112013@news.panix.com>
Date Sat, 23 Nov 2013 18:30:46 +1100
Subject Re: select.select()
From Chris Angelico <rosuav@gmail.com>
To python-list@python.org
Content-Type text/plain; charset=ISO-8859-1
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 <https://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 <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.3073.1385191849.18130.python-list@python.org> (permalink)
Lines 16
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1385191849 news.xs4all.nl 15863 [2001:888:2000:d::a6]:43224
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:60280

Show key headers only | View raw


On Sat, Nov 23, 2013 at 1:15 PM, Roy Smith <roy@panix.com> wrote:
> (*) I'm not sure if real MUDs are programmed this way, but it's a
> plausible architecture.  For simplicity sake, I'm assuming a
> single-threaded server.

Yeah, they certainly can. That's effectively the way that I programmed
the MUD kernel that we used at work (not for games, but it's still
effectively a MUD), although I used async I/O facilities to abstract
away the actual select calls. It's as good as the multi-threaded model
(which is what I use in Minstrel Hall - every connection spawns a
thread, which does blocking reads and blocking writes; simplifies the
code when a command wants to delay the user, as it simply sleep()s),
and can often scale to more concurrent connections, although for the
bulk of servers that's not going to be an issue.

ChrisA

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


Thread

select.select() Bhanu Karthik <bhanukarthik2002@gmail.com> - 2013-11-22 17:42 -0800
  Re: select.select() Roy Smith <roy@panix.com> - 2013-11-22 21:15 -0500
    Re: select.select() Bhanu Karthik <bhanukarthik2002@gmail.com> - 2013-11-22 21:43 -0800
    Re: select.select() Chris Angelico <rosuav@gmail.com> - 2013-11-23 18:30 +1100
  Re: select.select() Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-11-23 02:29 +0000
    Re: select.select() Bhanu Karthik <bhanukarthik2002@gmail.com> - 2013-11-22 21:41 -0800

csiph-web