On Fri, Feb 25, 2011 at 10:04 PM, .Bill Smith <william.m.sm...@gmail.com> wrote:
> If you are running any non-daemon threads, even System.exit won't cause the
> JVM to shut down.

I'm pretty sure it will. Falling off the end of main won't and closing
all GUI windows won't, but System/exit is supposed to kill the VM
reliably.

In particular, when I did this:

user=> (def q (agent []))
#'user/q
user=> (send q conj 3)
#<Agent []>
user=> (System/exit 0)
Repl is disconnected

and Task Manager showed the Java process disappearing completely, even
though (for some odd reason) agent threads are non-daemon (which is
why the JVM will linger after a GUI closes if you don't call
shutdown-agents after using agents).

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to