File tree Expand file tree Collapse file tree 1 file changed +11
-10
lines changed
src/main/clojure/clojure/core/async/impl Expand file tree Collapse file tree 1 file changed +11
-10
lines changed Original file line number Diff line number Diff line change 8282
8383(defn- executor-ctor
8484 [workflow]
85- # (Executors/newCachedThreadPool (counted-thread-factory (str " async-" (name % ) " -%d" ) true )))
85+ (Executors/newCachedThreadPool (counted-thread-factory (str " async-" (name workflow ) " -%d" ) true )))
8686
87- (def ^:private workflow->es-ctor
88- {:compute (executor-ctor :compute )
89- :io (executor-ctor :io )
90- :mixed (executor-ctor :mixed )})
87+ (defn- default-construct-executor
88+ [workload]
89+ (case workload
90+ :compute (executor-ctor :compute )
91+ :io (executor-ctor :io )
92+ :mixed (executor-ctor :mixed )))
9193
9294(defn construct-executor
9395 [workload]
94- (let [default-ctor (workflow->es-ctor workload)]
95- (if-let [sysprop-ctor (when-let [esf (System/getProperty " clojure.core.async.executor-factory" )]
96- (requiring-resolve (symbol esf)))]
97- (or (sysprop-ctor workload) (default-ctor workload ))
98- (default-ctor workload ))))
96+ (if-let [sysprop-ctor (when-let [esf (System/getProperty " clojure.core.async.executor-factory" )]
97+ (requiring-resolve (symbol esf)))]
98+ (or (sysprop-ctor workload) (default-construct-executor workload ))
99+ (default-construct-executor workload )))
99100
100101(def executor-for
101102 {:compute (construct-executor :compute )
You can’t perform that action at this time.
0 commit comments