Subject: Re: Regarding suspend(0) and lag

From: [email-masked] (David W. Berry)
Date: Mon, 22 Feb 1993 13:35:09 -0800

At 0442 2/22/93 -0800, Theodore F Vaida ][ wrote:
>Since the Lambda MOO server is non-premptive on task execution, it implicitly
>relies on progammers to be nice and include "suspend(0);" or such inside

Which brings up an interesting point.  How much code would be broken, and
how much simpler would life be for programmers if looping constructs such
as for and while included an implicit suspend_if_needed at the server
level?

David W. Berry           [email-masked]         (408) 321-0154
Greenwing Enterprises;  394 Southbay Dr.;  San Jose, CA  95134

---

From: Pavel Curtis <[email-masked]>
Date: Thu, 25 Feb 1993 10:22:00 -0800

> Date:	Mon, 22 Feb 1993 13:35:09 -0800
> From:	[email-masked] (David W. Berry)
> 
> How much code would be broken, and how much simpler would life be for
> programmers if looping constructs such as for and while included an implicit
> suspend_if_needed at the server level?

Such an implicit suspend_if_needed would be quite insidious, I believe, since
it would rob programmers of atomicity *far* too frequently.  For amateur
programmers (who make up by far the majority of the MOO's programming
community), we want to keep the concurrency model as simple as we can.  So long
as the server remains centralized (i.e., not distributed), I believe that the
every-task-runs-atomically model is the right one.  Most people don't write MOO
code that requires suspending and those who do have generally done enough MOO
programming to understand the consequences of adding a suspension.

	Pavel