Fork me on GitHub
#admin-announcements
<
2015-06-23
>
sveri13:06:22

@stammi: Who would have known that otto turns into such an interesting company, programming wise. I was watching one of your developers talk about scala during WJAX 2013, awesome talk simple_smile

sveri13:06:49

too bad you're sitting in Hamburg

stammi14:06:27

@sveri: if you ever happen to be in Hamburg and have an hour or two spare time you can visit us and have a look around

sveri15:06:47

@stammi: sounds good, I'll come back to that simple_smile

mohan21:06:18

How do I run this code in lein without exiting from the jvm?

(ns hello-world.async-test
  (:gen-class))
(require '[clojure.core.async :as async :refer :all])
(require '[clojure.repl])

(defn -main [& args]
  (doseq [i (range 10)]
  (go (while true (let [random (rand-int 10)]
                  (println "Random ::" random))))
  ))

mohan21:06:17

I want to use lein trampoline run command and watch how JVM using jvisualvm

joelkuiper21:06:55

@mohan: you can block the main with something like (while true (Thread/sleep 100))

mohan21:06:50

@joelgluth: Thanks! I kinda figured - it looks I can run lein trampoline run -m clojure.main and run the doseq.

alexmiller23:06:42

@joelkuiper: a fun trick is to call (.join Thread/currentThread) - single thread blocking on itself