 
   IReconciler
   (dispatch! [this cname action args]
-    (-swap! this #(let [ctrl (get controllers cname)
+    (queue-update! #(let [ctrl (get controllers cname)
+                          cstate (get % cname)]
+                      (->> cstate
+                        (ctrl action args)
+                        (assoc % cname))))
+    (schedule-update!
+     #(swap! state (fn [state]
+                     (let [new-state (reduce (fn [state f] (f state)) state @queue)]
+                       (vreset! queue [])
+                       (vreset! schedule [])
+                       new-state)))))
+
+  (dispatch-sync! [this cname action args]
+    (swap! state #(let [ctrl (get controllers cname)
                         cstate (get % cname)]
                     (->> cstate
                       (ctrl action args)

(ns scrum.reconciler)

(defprotocol IReconciler
  (dispatch! [this controller action args])
  (broadcast! [this action args]))

(deftype Reconciler [state controllers meta]
  Object

  IHash
  (-hash [this] (goog/getUid this))

  IPrintWithWriter
  (-pr-writer [this writer opts]
    (-write writer "#object [scrum.reconciler.Reconciler ")
