            (let [[ch msg] args]
              (swap! vis #(-> %
                              (assoc-in [:actxs actx :wait-chs ch] :put)
-                             (vis-add-ch ch)
+                             (vis-add-ch ch nil)
                              (assoc-in [:chs ch :msgs msg] true)))))
     :end (fn [vis actx args]
            (let [[ch msg result] args]

           (let [[ch] args]
             (swap! vis #(-> %
                             (assoc-in [:actxs actx :wait-chs ch] :take)
                             (vis-add-ch ch)
                             (update-in [:chs ch :first-taker-actx]
                                        (fn [fta]
                                          (if fta fta actx)))))))
    :end (fn [vis actx args]
           (let [[ch msg] args]
             (swap! vis #(-> %


;; ------------------------------------------------

(defn vis-add-ch [vis ch first-taker-actx]
  (-> vis
      (update-in [:chs ch]
                 #(if (nil? %)
                    {:id ((:gen-id vis))
                     :msgs {}
                     :first-taker-actx first-taker-actx}
                    %))
      (update-in [:chs ch :first-taker-actx]
                 #(if % % first-taker-actx))))

(def vis-event-handlers
  {"ago"
