                         (Thread/sleep (exp-backoff (inc nerrors)))
                         (recur (inc nerrors))))))))]
 
-        (dorun (repeatedly nthreads (fn [] (future (start-polling-loop!))))))
+        (reset! thread-futures_
+          (doall (repeatedly nthreads (fn [] (future (start-polling-loop!)))))))
 
       true)))
 

  (start [this])
  (stop  [this]))

(defrecord Worker [conn-opts qname running?_ opts]

  java.io.Closeable (close [this] (stop this))

  IWorker
  (stop [_]
    (when (compare-and-set! running?_ true false)
      (timbre/infof "Message queue worker stopped: %s" qname)
      true))


            eoq-backoff-ms exp-backoff
            auto-start     true}}]]

  (let [w (Worker. conn-opts qname (atom false) (atom [])
            {:handler        handler
             :monitor        monitor
             :lock-ms        lock-ms
