On Mon, Oct 7, 2019 at 5:03 PM Göran Weinholt <xxxxxx@weinholt.se> wrote:
 
I've updated the SRFI 170 implementation in Loko Scheme wrt draft #7 and
I think it covers everything now.

Great!
 
The draft says that they are based on dynamic-wind. However,
dynamic-wind handlers are run when Loko switches between tasks.

From SRFI 18:

When the scheduler stops the execution of a running thread T1 (whether because it blocked, expired its quantum, was terminated, etc) and then resumes the execution of a thread T2, there is in a sense a transfer of control between T1's current continuation and the continuation of T2. This transfer of control by the scheduler does not cause any dynamic-wind before and after thunks to be called. It is only when a thread itself transfers control to a continuation that dynamic-wind before and after thunks are called.

One approach is to have a special version of call/cc (sometimes known as "R4RS call/cc") that does not interact with the dynamic-wind system.
 
The drafts are looking better and better.

Thanks.



John Cowan          http://vrici.lojban.org/~cowan        xxxxxx@ccil.org
Values of beeta will give rise to dom!
(5th/6th edition 'mv' said this if you tried to rename '.' or
'..' entries; see http://9p.io/who/dmr/odd.html)