On Fri, Mar 6, 2009 at 5:05 PM, Jason Wolfe <jaw...@berkeley.edu> wrote: > >> (Ctrl-C pressed here) >> Traceback (most recent call last): >> File "<stdin>", line 1, in <module> >> KeyboardInterrupt > > That is something I miss from SBCL. In SLIME-SBCL, you can just Ctrl- > C Ctrl-C to interrupt your code.
I just added a couple functions to clojure.contrib.repl-utils in an attempt to support Ctrl-C:
...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.
It does use Thread.stop(), which is deprecated and has all kinds of important warnings. But are the risks of using Thread.stop() really worse than the consequences of shutting down the entire JVM? I'll leave that for you to decide.
Please let me know if this fails in some case, or even more importantly if it causes any kind of breakage.