 (ns nanomsg.benchmark
-  (:require [nanomsg :as nn])
+  (:require [nanomsg :as nn]
+            [clojure.core.async :as async])
   (:gen-class))
 
 (defn- thread
   [func]
   (let [th (Thread. func)]
+    (.setDaemon th false)
     (.start th)))
 
 (defn- sleep

      (doseq [x (range 1000000000000)]
        (nn/send! pubsock "test foobar")
        (swap! sended inc)))))

  (Thread/sleep t))


(defn bench-fn1 []
  (let [sended    (atom 0)
        received  (atom 0)
        pubsock   (nn/socket :pub)]
