[self-interest] Re: self-interest digest

Mario Wolczko Mario.Wolczko at eng.sun.com
Fri Nov 12 17:58:34 UTC 1999

   I wrote:
   > All the stuff in  the CACM article is in 4.0, methinks, including
   > turning off stepping for morphs whose step method is broken.

Jecel replied:
   True. I finally drummed up some courage and took a look at this
   part of the code. I can't say I followed it fully as it is one of
   the most twisted pieces of code I ever saw (the most was the Unix

Thanks!  I do my best! ;-)

Seriously, this is a pretty tricky system.  (I hope I get these
details right; I haven't looked at the code in quite a while.)
One reason is that the only way to safely handle problems in one
thread is to hand off to another thread, so the code contain some
tricky synchronizations.  For example, if a morph is sent a step
message, and does not complete within 5(?) seconds, a watcher thread
suspends the thread, and removes the morph from the list of morphs
being stepped.  Also, if there is a problem in a thread (such as a
failure in the basic display loop) we need to spawn another world,
with another thread, containing a debugger on the failing thread.  I
doubt this could have all been done with conventional exception
handling in a single thread, although it may have simplified the code
a bit (I would have to take a fresh look to be sure).

   Anyway, the whole point is to be able to continue in the same
   world after the most common morphic boo boos. And that is nicer
   than getting dumped in a new windows (specially if other people
   are in the same world with you), isn't it?

Yes, that's a nice goal.  (Note that if, in the existing system, you a
sharing a world that fails, everyone in that world gets transported to
the new world.  Of course, anyone who was not actively watching what
you were doing will be mighty surprised!)


More information about the Self-interest mailing list