[Seaside] Seaside Internals

Avi Bryant avi at beta4.com
Mon Sep 8 14:51:00 CEST 2003


On Mon, 8 Sep 2003, Stephen Pair wrote:

> Could you explain that a little more.  Do you mean that a continuation
> cannot be concurrently invoked?  I suspect that's the case since it
> doesn't look like you're copying the context objects in #restoreValues
> ...btw, didn't you copy the stack in previous versions?

Correct.  I did used to copy the stack, and I don't anymore - and so
concurrent invocation of a continuation would be a mess.  Copying the
stack had even more problems, however, because you simply can't track down
all the places where there's an explicit reference to a context, and
modify them to refer to the copy instead - I kept having to add more and
more special cases like this to the Continuation code when I was stack
copying.

It's very common in continuation implementations to have the restriction
"you can only invoke a continuation from the process in which it was
captured".  That's even more limiting, although it would still be fine for
Seaside.

The "context tags" Anthony added reduce the number of places that a
context object is directly referenced - so with those copying the stack
would be more realistic.  I'm not convinced it's worth the added
complexity, however.

> I just don't like the fact that sending #value to a Continuation trashes
> the calling stack (with no unwind)...it seems like that shouldn't be
> necessary.

It's not "necessary" - fork first.  I just can't think of a use case where
you'd *want* to fork, so I'm curious what you have in mind.




More information about the Seaside mailing list