On Mar 6, 5:58 pm, Chouser <[email protected]> wrote:

> This registers the current thread to be stopped next time an INT
> signal is recieved, which happens when the user presses Ctrl-C.  Try
> this:
>
>   user=> (Thread/sleep 10000)
>
> Then press Ctrl-C before the 10 seconds are up, and you'll see:
>
>   java.lang.Exception: SIGINT (NO_SOURCE_FILE:0)
>   user=>
>
> ...and you're back at the repl so you can try something else.  This
> works for busy loops and should work for IO and other blocking
> behavior.

Thanks for this - I just added it to my user.clj and now my reflexive
Ctrl-C Ctrl-C in slime to break runaway functions no longer kills the
clojure repl. Very nice.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to