"Andy Wingo" wrote: > When I try to sleep, but control-C in the middle of > it, I get some strange behavior: > >guile> (sleep 5) >$1 = 4 >guile> >ERROR: User interrupt >ABORT: (signal) >guile>
> It seems that we get the value back, *and* the error > thrown. Isn't it correct? An async is a thunk evaluated asynchronously with respect to the normal evaluation flow, for example when we do a 'select()' (grep the Guile source for SCM_TICK to see where). The documentation of 'sleep' does not say that the procedure will not return. 'sleep' itself is implemented with a call to 'select()'. By experimenting with the following script what do you see as incorrect? ;; ----------------------------------------- (define a 0) (sigaction SIGINT (lambda (. arg) (set! a (1+ a)))) (format #t "sleep ~A~%" (sleep 5)) (format #t "result ~A~%" a) (do ((i 1 (1+ i))) ((> i 1000000)) #f) (format #t "result ~A~%" a) ;; ----------------------------------------- -- Marco Maggi "They say jump!, you say how high?" Rage Against the Machine - "Bullet in the Head" _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://lists.gnu.org/mailman/listinfo/guile-user