Serzh: Could you give a few details about the software machine where you saw it not terminate, even after an hour? I may try collecting some info like this to add to the Clojure ticket. In particular, the outputs of the following commands.
java -version uname -a lsb_release -d time java -jar clojure-1.6.0.jar -e "(future 1) (shutdown-agents)" time java -jar clojure-1.6.0.jar -e "(future 1)" For that last one, if it runs more than 2 minutes without terminating, you can kill it. No need to wait for an hour. I have tried Ubuntu 14.04 desktop 64-bit running in a VM on my Mac, and the last command above terminates in about 60 seconds, for several different JVM versions (mostly Oracle). Yours is the first case I've heard of not terminating after about a minute, so wanted to try to reproduce that case. I think it would be good if it took the same short time to terminate as if you call shutdown-agents, even without calling shutdown-agents. I may also work on a patch for that ticket, after trying to summarize the long list of comments. Thanks, Andy On Thu, Jul 31, 2014 at 5:38 AM, Serzh Nechyporchuk <nechyporc...@gmail.com> wrote: > On my Ubuntu 14.04 laptop process doesn't terminates at all. I was waiting > about an hour. > Also this issue affects code which uses datomic.api, which, I think, uses > futures too. > > Середа, 30 липня 2014 р. 22:50:11 UTC+3 користувач Andy Fingerhut написав: >> >> Never is an awfully long time :-) If you wait about 60 seconds, the >> command you gave calling (future 1) does terminate, at least on Mac OS X >> 10.8.5 where I tested it, and I have seen the same behavior on Linux and I >> think Windows. >> >> This version terminates much more quickly: >> >> java -jar clojure-1.6.0.jar -e "(future 1) (shutdown-agents)" >> >> There is some discussion of this issue at the ClojureDocs page for the >> function 'future', including that this issue affects pmap and >> clojure.java.shell/sh, too, because are both implemented using futures: >> >> http://clojuredocs.org/clojure_core/clojure.core/future >> >> It also includes a link to a Clojure ticket suggesting that this behavior >> change. You can vote on it if you like (requires a Clojure JIRA account, >> which you can create by clicking on the "Log In" link near the top right of >> the page): >> >> http://dev.clojure.org/jira/browse/CLJ-124 >> >> Andy >> >> >> >> On Wed, Jul 30, 2014 at 12:33 PM, Serzh Nechyporchuk <nechyp...@gmail.com >> > wrote: >> >>> Hello. I have a problems using code with futures. For example, if I run >>> following code: >>> >>> java -jar clojure-1.6.0.jar -e "(println 1)" >>> >>> the process prints 1 and terminates. >>> But when I'm trying to run code with futures: >>> >>> java -jar clojure-1.6.0.jar -e "(future 1)" >>> >>> the process doesn't terminates. >>> >>> This has real implication when I run some task using >>> >>> lein run -m some-ns/fun args >>> >>> If code above uses futures then this process will not terminate. This is >>> really frustrating. >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Clojure" group. >>> To post to this group, send email to clo...@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+u...@googlegroups.com >>> >>> For more options, visit this group at >>> http://groups.google.com/group/clojure?hl=en >>> --- >>> You received this message because you are subscribed to the Google >>> Groups "Clojure" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to clojure+u...@googlegroups.com. >>> >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> -- > 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 > --- > You received this message because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- 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 --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.