[Seaside-dev] thoughts on partial continuations

Julian Fitzell jfitzell at gmail.com
Wed Feb 4 12:40:43 UTC 2009


It occurs to me that there is still a problem with our #call:
implementation.

We are using partial continuations, which is great, but we are still using
an exception to signal the end of callback processing. Signaling an
exception results the callback contexts being unwound and #ensure: blocks in
the callback being triggered. This is why WAClosureFunctionalTest doesn't
really make sense.

I noticed this because I noticed that WAComponent>>filterWith:during: did
not use an #ensure: to remove the filter. I was going to change that and
move the method to WARequestContext but realized that I can't do that and
have the method work properly with #call:

So it seems to me that what we should be doing on a #call: is saving the
partial continuation for the callback and then throwing those contexts away.
One option would be to simply capture a full continuation before doing the
callback but this requires a hook at that point again (which I know Lukas is
strongly against). The only other solution I can think of is to create a
new, empty PartialContinuation and then evaluate it with the same marker
that we used to create the other continuation (ie. the
#evaluateWithArgument: method). This effectively results in throwing away
the callback contexts and returning as if the callback completed.
#evaluateWithArgument: would then signal the exception.

Does this make any sense?

Julian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside-dev/attachments/20090204/0e92a946/attachment.htm


More information about the seaside-dev mailing list