[Seaside-dev] Seaside-Flow

Julian Fitzell jfitzell at gmail.com
Sun Jan 25 14:29:33 UTC 2009


On Sun, Jan 25, 2009 at 1:42 PM, Paolo Bonzini <bonzini at gnu.org> wrote:
> These are shift/reset continuations right?  I also have them in GNU
> Smalltalk though only emulated from full continations.  I probably have
> to adjust the API though.

Yup, exactly. Well, except there currently isn't an explicit reset
operation in the context chain; a compiled method is passed in as a
marker at the time of the shift. It's this coupling that I'm not
entirely happy with.

The changeset I posted provided an implementation using full
continuations but I'd be interested to see how it compares to GNU
Smalltalk's version. I couldn't see any way to do it without having a
hook at the point of the reset (and it is having this hook in the core
code that Lukas doesn't like).

I would very much like to see an implementation from our end that
allows both methods.

By the way, the problem I discovered with doing the emulation with
full continuations is that the dynamic scope is still wrong (no more
wrong than in Seaside 2.8). In other words, although execution returns
through the correct request handling context chain after the execution
of an emulated "partial" continuation, exceptions signaled during the
continuation still traverse (and unwind) the old, captured context
chain. This means the wrong ensure blocks may be executed and so on -
it basically works in Seaside 2.8 but it's almost a fluke and I've
discovered at least two weird bugs in the last 2 weeks that were
caused by it.

The only way to make sure this doesn't happen is to start a new
process as close to the place where you want to "reset" as possible
(that's what NewProcessBoundary was for in my changeset - I was
playing with putting the boundary inside WAPartialDemarcation). The
problem with that is that we can deal with passing, for example,
WAResponseNotifications across the process boundary by special casing
it but, in a more general sense, Errors and exceptions being used with
Glorp, OmniBase, or some other DB won't make it up to the Session,
which is where people have traditionally been catching them.

I'd love to move the process boundary but I don't quite know how to
make it practical. It's also less of a priority for me since it seems
GS, VW, and Squeak can all do the real partial continuations. But I've
thought a lot about it so I'm happy to discuss further with you if
you're interested to figure out what would work best for GNU.

Julian


More information about the seaside-dev mailing list