Pythoin MUD (PyMUD?)

Mike C. Fletcher mcfletch at home.com
Mon Jun 25 03:20:05 EDT 2001


In stackless, what you could do is establish a policy that any given
micro-thread cannot run longer than user.max_timeslices_per_thread (or
whatever you name it), then alter uthread.py's inner loop to enforce that
policy.  Your other threads would still get their timeslices while the bad
thread runs, and the wizard would get a "QuotaExceeded" error raised in
their micro-thread if it goes too far. Getting that error, they either
recode their loop or petition for a quota increase.

Enjoy yourselves,
Mike

-----Original Message-----
From: python-list-admin at python.org
[mailto:python-list-admin at python.org]On Behalf Of Greg Ewing
Sent: June 25, 2001 01:55
To: python-list at python.org
Subject: Re: Pythoin MUD (PyMUD?)


Remco Gerlich wrote:
>
> you need only one drunken wizard to
> code an infinite loop, and your driver locks up. I haven't found a
solution
> yet

Stackless could be a solution. Pre-emptively scheduled
microthreads. Your drunken wizard's code still runs forever,
but other things can happen at the same time.

--
Greg Ewing, Computer Science Dept, University of Canterbury,
Christchurch, New Zealand
To get my email address, please visit my web page:
http://www.cosc.canterbury.ac.nz/~greg
--
http://mail.python.org/mailman/listinfo/python-list





More information about the Python-list mailing list