[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Continuation sets and order-independency
From: |
David Kastrup |
Subject: |
Re: Continuation sets and order-independency |
Date: |
Sun, 08 Jan 2012 20:08:44 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux) |
Noah Lavine <address@hidden> writes:
> Okay, let me see if this is right now.
>
> In the expression
>
> (list (call-with-current-continuation func) (+ 4 14)),
>
> you want the addition to be done before the
> call-with-current-continuation, as opposed to being part of the
> continuation.
>
> Right?
This is part of it, yes. If you think as "(list expr1 expr2 ...)" as
(call-with-values (parallel expr1 expr2 ...) list)
and each of the expr might suspend its thread (and record the thread
somewhere for waking up), then you have parallel execution that
continues until all paths have reached completion or suspension.
Now instead of parallel execution, it would be ok to have the
serialization of call/cc but still continue in all paths to completion
or suspension.
Of course, a single call/cc just stores away a single continuation, and
whatever continuation while evaluating "list" was reached, one can't
prod Scheme into taking up another branch without letting that
continuation continue, so obviously something is missing in this
picture.
--
David Kastrup