Re: Understanding remove-ns and require

2017-12-19 Thread Andy Fingerhut
I don't have the answer, but perhaps a clue that might lead you to one: the function remove-lib inside of the tools.namespace library does this: (defn remove-lib "Remove lib's namespace and remove lib from the set of loaded libs." [lib] (remove-ns lib) (dosync (alter

Understanding remove-ns and require

2017-12-19 Thread Mark Melling
Hi, Apologies in advance for the possibly stupid question! I was having a problem with clojure.tools.namespace.repl/refresh where a namespace that had been successfully loaded subsequently failed to be reloaded when doing a repl/refresh. Whilst investigating the problem, (this is probably

Re: Slow -main function termination by pmap

2017-12-19 Thread Andy Fingerhut
Well, this behavior is documented _somewhere_, but not in the doc string or on clojure.org that I know of (happy to be corrected if I'm wrong there). On the ClojureDoc.org web site, the docs for pmap: http://clojuredocs.org/clojure.core/pmap suggest looking at the docs for future for info about

Re: Slow -main function termination by pmap

2017-12-19 Thread Mike
last line in -main should be (System/exit 0) or (shutdown-agents). 1 min awaiting it is documented behaviour of clojure. вторник, 19 декабря 2017 г., 23:08:09 UTC+3 пользователь Justin Smith написал: > > any Clojure program that uses the built in thread pools (future, agent, > pmap, core.async,

Re: Slow -main function termination by pmap

2017-12-19 Thread Jacek Grzebyta
That solved my problem! Thanks l lot! Jacek On 19 December 2017 at 20:08, Timothy Baldridge wrote: > Sometimes there's some weird interop with stuff like pmap and program > termination. What happens if you end your program with this function: >

Re: Slow -main function termination by pmap

2017-12-19 Thread Timothy Baldridge
Sometimes there's some weird interop with stuff like pmap and program termination. What happens if you end your program with this function: https://clojuredocs.org/clojure.core/shutdown-agents On Tue, Dec 19, 2017 at 1:05 PM, Jacek Grzebyta wrote: > Hi, > > I have multi

Re: Slow -main function termination by pmap

2017-12-19 Thread Justin Smith
any Clojure program that uses the built in thread pools (future, agent, pmap, core.async, etc.) should call (shutdown-agents) if prompt exit is needed On Tue, Dec 19, 2017 at 12:05 PM Jacek Grzebyta wrote: > Hi, > > I have multi -mains project. Thus the execution looks

Slow -main function termination by pmap

2017-12-19 Thread Jacek Grzebyta
Hi, I have multi -mains project. Thus the execution looks like: java -cp location/file.jar some.method .. One -main method looks like: (defn -main [& args] (let [validated (validate-args args)] (if (:msg validated) (println (st/join \newline (:msg validated))) (run