             (loop [verts (vertices g)]
               (when-let [v (first verts)]
                 (when (should-collect? v c-thresh)
-                  ((-> v :state deref ::collect-fn) vertex))
+                  (collect! v))
                 (when (should-signal? v s-thresh)
                   (signal! v))
                 (recur (next verts))))

(def default-context-opts
  {:collect-thresh 0
   :signal-thresh  0
   :timeout        100
   :max-ops        1e6})

(defn vertex

    vertex))

(defn execution-result
  [type p colls sigs t0 & [opts]]
  (->> {:collections colls
        :signals     sigs
        :type        type
        :time        (* (- (System/nanoTime) t0) 1e-6)}
       (merge opts)
       (deliver p)))

(defn async-context
  [opts]
