std.dispatch.core

create-dispatch

added in 3.0

(create-dispatch m)

creates a core dispatch

;; POOL SIZE 2, NO SLEEP (test-scaffold +test-config+ 100 10) => #(-> % count (= 100))

;; POOL SIZE 2, WITH SLEEP (test-scaffold (assoc +test-config+ :handler (fn _ _(Thread/sleep 200))) 5 100) => #(-> % count (= 2))

;; POOL SIZE 50, WITH SLEEP (test-scaffold (-> +test-config+ (assoc :handler (fn _ _(Thread/sleep 200))) (assoc-in :options :pool :size 50)) 80 30) => #(-> % count (>= 50))

create-dispatch-typecheck

submit-dispatch

added in 3.0

(submit-dispatch {:keys [runtime handler], :as dispatch} entry)

submits to the core dispatch