[plt-scheme] interrupting make-module-evaluator

From: Tom Schouten (tom at zwizwa.be)
Date: Sun Jul 12 06:13:13 EDT 2009


Say you have a module which takes a while to instantiate using         
"make-module-evaluator" from scheme/sandbox.  How would you
make it possible to interrupt the instantiation?  Obviously
"kill-evaluator" or "break-evaluator" won't work yet since there is no
value to apply them to, and other attempts to kill it seem to fail:

(define e #f)
(define t 
   (lambda ()
     (set! e
            '(module foo scheme/base (let x () (x))))))))

# (kill-thread t)
kill-thread: the current custodian does not solely manage the specified thread: #<thread>

This seems to leave the instantiation still running in the
background (judging from "top").

# (break-thread t) 

However, hitting ctrl-c when evaluating the following does seem to
stop the instantiation.

# (make-module-evaluator '(module foo scheme/base (let x () (x))))

This is in v4.2.0.5 [3m] from svn 15326 2009-06-29 09:50:11
Any ideas?


Posted on the users mailing list.