Boost logo

Boost :

From: Giovanni Piero Deretta (gpderetta_at_[hidden])
Date: 2006-09-14 15:00:02


On 9/14/06, Jose <jmalv04_at_[hidden]> wrote:
> Hi, Giovanni,
>
> I found 2 papers that shed some light on the solution using one-shot
> continuations. The key is to detect when the continuation is invoked a
> second time and provide a suitable error
>
> Interaction-Safe State for the Web
> http://www.cs.brown.edu/~sk/Publications/Papers/Published/mk-int-safe-state-web/
>
> The Influence of Browsers on
> Evaluators<http://www-spi.lip6.fr/%7Equeinnec/PDF/webcont.pdf>
> http://www-spi.lip6.fr/~queinnec/PDF/webcont.pdf
>

Hum, a quick read of the papers seems that they deal on how not
executing full continuation a second time by making them one shot in
some cases (for example in presence of database updates), so they are
not really much relevant. In those papers, the detection is done from
*inside* the continuation (a full continuation). We cannot do that and
need to do it from the outside. This is nothing new. You need to do it
even on web applications not built using continuations of any sorts.

An innovative idea would be an easy way to have backtracking with one
shot continuations. One of the examples in my library implements
backtracking with coroutines. I'll see if it can be expanded, but it
would require at least a new coroutine for backtracking point.

BTW, posix has a nice and simple way for creating full continuations.
It is called 'fork' :). Unfortunately it is a little too heavyweight.

--
Giovanni P. Deretta

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk