On Wednesday 17 December 2008 10:57, Randall R Schulz wrote: > On Monday 15 December 2008 17:58, Randall R Schulz wrote: > > ... > > This sequence of evaluations ends in the REPL hanging: > > 1:1 user=> (.. Runtime (getRuntime) (addShutdownHook (new Thread > shutdown-agents))) nil > 1:2 user=> (def agent-99 (agent "Secret agent (99)")) > #'user/agent-99 > 1:3 user=> (send-off agent-99 (fn [a] (println (str "In agent: " > a)))) In agent: Secret agent (99) > #<Agent clojure.lang.ag...@5b0668> > 1:4 user=> (await agent-99) > nil > 1:5 user=> > > CTRL-D > > [ Hangs here. CTRL-C gets back to shell prompt. ]
Since Chouser asked on #clojure which REPL (I was using the Contrib REPL), I tried this with the stock REPL and the hang does not occur. In fact, with the stock REPL and _without_ registering the shutdown hook, the hang also does _not_ occur. So it would seem this is all about the Contrib REPL, not Agents or shutdown hooks or interactions between them. Randall Schulz --~--~---------~--~----~------------~-------~--~----~ 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 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 -~----------~----~----~----~------~----~------~--~---