Saving and resuming an exception context?
Avi Bryant
avi at beta4.com
Thu Mar 25 19:26:53 UTC 2004
On Mar 25, 2004, at 6:51 AM, Ned Konz wrote:
> On Thursday 25 March 2004 1:12 am, Avi Bryant wrote:
>> On Mar 24, 2004, at 4:34 PM, Ned Konz wrote:
>>> I'd like to be able to evaluate a block, and upon an exception freeze
>>> the
>>> execution state so that it can be resumed later (not necessarily from
>>> the
>>> same context). Kind of like a continuation, but without replacing the
>>> current
>>> stack context.
>>
>> Why not replacing the current stack context? Is that an
>> implementation
>> detail or an actual requirement?
>
> I can't replace the *entire* stack context, because I'm going to be
> doing this
> from the UI thread (which isn't being actively managed).
I still don't really understand. You mean you don't want to trash the
stack of the UI process? You just have to save it into one
continuation before you invoke another (as my example does).
> Interesting. What's the status of continuation support in the current
> image
> and VM?
Squeak has never needed VM modifications to support continuations.
There are a couple of different image level implementations, one from
Anthony and the one I use in Seaside. Anthony's version is reentrant,
whereas mine isn't (roughly, you should only invoke a continuation from
the same process in which it was captured). Mine is less intrusive,
however - Anthony's requires modifications to any mechanisms, like
exception handling, that need to walk the stack, whereas mine is a
single class with no extensions.
The Seaside-Continuations category (with tests and an example) is
attached in case you're interested.
Avi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Seaside-Continuations.st
Type: application/text
Size: 10503 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20040325/6feff19d/Seaside-Continuations.bin
-------------- next part --------------
More information about the Squeak-dev
mailing list
|