File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
src/main/clojure/clojure/core Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -466,7 +466,7 @@ to catch and handle."
466
466
" Executes f in another thread, returning immediately to the calling
467
467
thread. Returns a channel which will receive the result of calling
468
468
f when completed, then close. workload is a keyword that describes
469
- the expected profile of the work performed by f, where:
469
+ the work performed by f, where:
470
470
471
471
:io - may do blocking I/O but must not do extended computation
472
472
:compute - must not ever block
Original file line number Diff line number Diff line change 71
71
[workflow]
72
72
(Executors/newCachedThreadPool (counted-thread-factory (str " async-" (name workflow) " -%d" ) true )))
73
73
74
- (defn ^:private default-executor-factory
74
+ (defn ^:private create- default-executor
75
75
[workload]
76
76
(case workload
77
77
:compute (make-ctp-named :compute )
101
101
(let [sysprop-factory (when-let [esf (System/getProperty " clojure.core.async.executor-factory" )]
102
102
(requiring-resolve (symbol esf)))
103
103
sp-exec (and sysprop-factory (sysprop-factory workload))]
104
- (if (= workload :core-async-dispatch )
105
- (or sp-exec (executor-for :io ))
106
- (or sp-exec (default-executor-factory workload )))))))
104
+ (or sp-exec
105
+ (if (= workload :core-async-dispatch )
106
+ (executor-for :io )
107
+ (create-default-executor workload)))))))
107
108
108
109
(defn exec
109
110
[^Runnable r workload]
You can’t perform that action at this time.
0 commit comments