Question about thread/interrupt

Burkhard Neppert <[email protected]> Sat, 22 Mar 2008 20:54:19 +0100
Newsgroups gmane.comp.java.sisc.user
Message-ID <[email protected]>
Hello,

I have a question about thread/interrupt.
The code below  starts a thread that should catch interrupts, print a
message in that case
and then go on by calling the error continuation.
This works for the first call of thread/interrupt but the second
call seems to have no effect. Any idea what I'm doing wrong or why
the second call to thread/interrupt has no effect?
I'm using sisc 1.16.6 on a java.vm.version=1.6.0-b105


(define th (thread/spawn
            (lambda ()
              (with/fc
               (lambda (err cont)
                 (display "Caught interrupt")(newline)
                 (cont))
               (lambda ()
                 (let loop () (display ".") (sleep 1000) (loop)))))))
;; Starts printing a "." every second
(thread/interrupt th) ;; Displays "Caught interrupt" and continues to
print "."
(thread/interrupt th) ;; This time the message is not displayed, thread
keeps printing dots.



Burkhard



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/