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

(defprotocol IGraphExecutor
  (execute! [_])
  (stop! [_])
  (control-channel [_]))

(defn simple-collect
  [collect-fn]

       (deliver p)))

(defn stop-execution
  [bus vertices]
  (run! close! bus)
  (run! close-input! vertices))

(defn async-context
  [opts]
  (let [ctx       (merge default-context-opts opts)
        bus       (vec (repeatedly (:bus-size ctx) chan))
        ctx       (assoc ctx :bus bus)
        processor (:processor ctx)
        c-thresh  (:collect-thresh ctx)
        s-thresh  (:signal-thresh ctx)
