         time-stamp (burst-time (:tags image) @state)]
     (annotate-image image event @state time-stamp)))
 
-(defmacro doseq-parallel [seq-exprs & body]
-  `(let [pool# (-> (Runtime/getRuntime) .availableProcessors Executors/newFixedThreadPool)]
-     (println (.getCorePoolSize pool#))
-     (doseq ~seq-exprs
-       (let [body-fn# (cast Runnable (fn []
-                                       ;(println (str (Thread/currentThread)))
-                                       ~@body))]
-         (.submit pool# body-fn#)))
-     (.shutdown pool#)
-     (.awaitTermination pool# 10 TimeUnit/DAYS)))
-
 (defn produce-burst-images
   "Pops images from circular buffer and sends them to output queue."
   [burst-events camera-channel-names timeout-ms out-queue]
   (let [total (* (count burst-events)
                  (count camera-channel-names))
-        camera-index-tag (str (. mmc getCameraDevice) "-CameraChannelIndex")
-        images (map (fn [_] (pop-burst-image timeout-ms)) (range total))]
-    (time
-    (doseq [image images]
+        camera-index-tag (str (. mmc getCameraDevice) "-CameraChannelIndex")]
+    (doseq [_ (range total)]
       (.put out-queue
-            (-> image
-                ;(time)
+            (-> (pop-burst-image timeout-ms)
                 (tag-burst-image burst-events camera-channel-names camera-index-tag)
-                make-TaggedImage)))))
+                make-TaggedImage))))
   (burst-cleanup))
 
 (defn collect-burst-images [event out-queue]

                 (not (core isContinuousFocusEnabled)))
        (enable-continuous-focus true))
      (. gui enableRoiButtons true))
    (catch Throwable t (do (.printStackTrace t)
                           (ReportingUtils/showError t "Acquisition cleanup failed.")))))

;; running events


(def active-slice-sequence (atom nil))

(def pixel-type-depths {"GRAY8" 1 "GRAY16" 2 "RGB32" 4 "RGB64" 8})

(defn throw-exception [msg]
  (throw (Exception. msg)))

;; time

