[DGD] priority of user/network i/o vs callouts
Felix A. Croes
felix at dworkin.nl
Sun Feb 16 16:59:42 CET 2014
Raymond Jennings <shentino at gmail.com> wrote:
> I remember one time you said you'd refuse any patches that rearranged
> things so that callouts were pushed behind user i/o or something.
>
> Did I get that right, and if so...why is dgd's design based on this
> relative priority?
>
> My personal choice would be to have interrupts at top priority, then
> handling i/o, then callouts, and finally housekeeping.
Interrupts in DGD are triggered by kill signals. Signals are a
rudimentary form of inter-process communication, and as such they are
a very poor choice for the highest priority.
Callouts must have higher priority than user input because there will
be many callouts for each user command; this is not true for the classic
mudlibs, but it is true for modern ones (e.g. Discworld) and for non-mud
uses. Callouts are already kept in check by the fact that they are
run in batches, and a callout started from one batch will not execute
until the next batch at the earliest, with user input handled in between
those batches.
The idea that callouts should have lower priority than user input is
prompted by the notion that admins can login and stop callout explosions.
That doesn't really work anyway, and callout explosions are best prevented
in a different way, for instance by imposing resource limits.
Regards,
Felix Croes
More information about the DGD
mailing list