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


Groups > comp.lang.python > #60280

Re: select.select()

References <b8d42424-e0ab-4595-9c87-25e5c1b53349@googlegroups.com> <roy-4170EF.21151022112013@news.panix.com>
Date 2013-11-23 18:30 +1100
Subject Re: select.select()
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.3073.1385191849.18130.python-list@python.org> (permalink)

Show all headers | 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