Hi, I am learning Clojure for some weeks now and i've just started playing around with threads.
But as soon as i used threads in a clojure script the program had a 60 seconds period of doing nothing after the script completed and before it returned to the command prompt or Slime REPL prompt. I assumed this must be some kind of timeout setting in Java or Clojure but i didn't know how to change or delete this. So I've tried some thread example scripts i found (for example the barbershop scripts from CGrand or LauJensen) with different Clojure versions, Java versions and different PCs, always with the same result. At last after some hours of unsuccessful tries and google searches i stumbled across some short answer here in this group mentioning (shutdown-agents). So i did (doc shutdown-agents): ------------------------------------------- clojure.core/shutdown-agents ([]) Initiates a shutdown of the thread pools that back the agent system. Running actions will complete, but no new actions will be accepted ------------------------------------------- Aha!! Using this command as the last statement in the example scripts immediately solved my problem. So my question is: Is there a reason why (shutdown-agents) is not used and/or explained more in Clojure concurrency examples? Doing so would avoid some frustration for the people learning Clojure IMHO. Any comment to shed some light on this would be appreciated. Thanks Gerhard
-- 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