[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: exception systems

From: "Guillermo J. Rozas" <gjr@martigny.ai.mit.edu>
Subject: Re: exception systems
Date: Thu, 18 Apr 96 13:47:05 -0400

> For example, timer interrupts can be used to switch contexts but also
> to abort a potentially-blocking operation.  In the first use it is
> hard to see them as exceptions, while in the second it is very natural.

It would perhaps be a good idea to look at John Reppy's interrupt
handling mechanism for SML/NJ.  It is based on continuations.  This
way one can easily build context-switch on top of it (which is what he
needed it for -- because he wanted to use it for CML), but it is
almost trivial to write a signal handler that raises an exception
should this be the desired effect.

Of course, for all this to work efficiently one needs a very efficient
implementation of call/cc.