Chris Double wrote:
> Shouldn't this be run in a scope or is fry doing that for you? If you
> have nested with-exit-continuation calls, then the inner will
> overwrite the exit-continuation won't it?
>
> Chris.
>   
This word intentionally doesn't use a scope. This is from the HTTP 
server which does the entire client request in a big with-scope + 
with-destructors, so responders don't have to nest large numbers of scopes.

Using with-variable, the code looks different,

: with-exit-continuation ( quot -- obj )
    [ exit-continuation rot with-variable ] callcc1 ;

Or using fry,

: with-exit-continuation ( quot -- obj )
    '[ exit-continuation , with-variable ] callcc1 ;

FWIW, fry is documented now.

Slava

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Factor-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to