cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephan Michels <>
Subject Re: Groovy support in Cocoon
Date Mon, 05 Apr 2004 09:45:58 GMT
Am Mo, den 05.04.2004 schrieb Christopher Oliver um 4:42:
> The current implementation needs some work to qualify as "generalized 
> Java continuations". It would be nice to make it work more like Scheme 
> continuations:
> 1) When you access the "current" continuation, it captures the call 
> stack up to but not including the current method (and makes a (shallow) 
> copy of it). The current method continues as normal. 

What to you mean with "continues as normal". The current impl. stops the
execution of the method with null as return value, if the cuntinuation
is suspended. Then the continuation captures the object of the method
call and the current frame.

> The reason for 
> making a copy is to prevent further modification of the captured 
> continuation stack as the method call stack unwinds (see below).
> 2) To resume a continuation you invoke it - like a method call through 
> reflection - and you can pass an object to this call (which becomes the 
> return value of the method where the continuation was created).

Yes, but you need all the objects of every stack trace elements to
restore the stack trace. Not only the last one.

> 3) Before the continuation is resumed another copy of the stack is made 
> (the original continuation stack is treated as an immutable object). 
> This makes it possible to invoke the continuation more than once.


> It's possible to make the stack copying occur lazily as an optimization 
> (in case another continuation is invoked the method at the top of the 
> stack never returns so copying the remaining frames isn't necessary).

? Sorry, I didn't get it :-/

Can you elaborate this a bit more, how you want to make work like in

View raw message