[plt-scheme] Graphics Questions

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Sun Nov 25 20:01:32 EST 2007

At Sun, 25 Nov 2007 17:52:54 -0700, "Doug Williams" wrote:
> I get an error "continuation application: attempt to cross a continuation
> barrier".  I assume MrEd is using threads or other elements that cause the
> continuation barrier.

Yes.

> Does anyone have a suggestions?

Delimited continuations. Wrap the body of your callback in
`call-with-continuation-prompt':

   (call-with-continuation-prompt
     (lambda ()
       (if *break*
           (begin
             (set! *break* #f)
             (*continue*))
           (test-run))))


Matthew



Posted on the users mailing list.